Home > Web Front-end > HTML Tutorial > Ask experts about css issues. _html/css_WEB-ITnose

Ask experts about css issues. _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:17:35
Original
969 people have browsed it

Experts, I am writing .html and .css files. The main content is to write a link in italic red font. A:link is used in it, but when writing another link, I am required not to use css pseudo. The class and the style used are ordinary, but after I write it, how it runs is affected by the previous style. How can the second link not be affected? what to do? The code is as follows
xx.html:






Great China



Link to Baidu

< br/>


                                                  

The xx.css file is as follows:
a:link
{ font-size:30px;
color:blue;
text-decoration:underline;
font-style:italic;
}






Reply to discussion (solution)

Because the first One a is included in but the second one is not, so the style can be modified as:

span a:link
{ font-size:30px;
color:blue;
text -decoration:underline;
font-style:italic;
}

Just cover the previous one. If not, add an !important

to narrow the scope. For example

Just set the style of the first a tag. Everything else remains unchanged. Just #a a:hover{} In this way, only the first one will cover the style behind the mouse, and the others will remain unchanged

Because the first a is included in and the second one is not, so it is OK Modify the style to:

span a:link
{ font-size:30px;
color:blue;
text-decoration:underline;
font-style:italic;
}

So, experts, what should I do if the first and second ones are both in ? In addition, how do you understand span a:link?

Add class to a, then a.class

You need to figure out the priority of css,

This is very simple.
These are all basic questions.

Nonsense. If you define a:link, the computer will default to all the a’s above you having the same color after a:link. How can you get what you want. You have to tell the computer which is which

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template