Wildcard selectors typically have three kinds: class,id and HTML
Class: With the # ID: used. HTML: Tag name that is directly HTML
The precedence of wildcard characters is: id>class>html
If there is an ID and class at the same time in a label, the property will execute if there is no conflict, but if the property has a conflict, such as setting the class in the ID setting the text color to green, and setting the color to yellow in class, then the text will appear green by priority.
Exception, you can set the parent-child Selector
<body>
Hello, Beijing ...
<span class= "Style1" > News one </span>
<span class= "Style1" > News II </span>
<span class= "Style1" > news three </span>
<span id= "Style2" > news four <span > This is a very important news. <span> second nesting span</span></span></span>
</body>
The CSS file is:
#style2 {
color:green;
font-size:30px;
background-color:silver;
}
#style2 span{
Color:yellow;
Font-weight:bold;
}
#style2 span span{
color:black;
Background-color:silver;
}
Exceptions, if there are two Cass, as follows:
<span class= "Style1 style3" > ID and class</span>
In this case, the order of execution is not based on the order of class, but according to the position of Style1 and Style3 in CSS, who is in the back, the final effect is who, similar to the effect of coverage.
Add. Wildcard characters
*{
margin:0px;
padding:0px;
}
Margin: upper right and lower left--clockwise
If there are only 3: margin:0px 10px 20px then it is (up and down) right left