Css
sub-item declaration
Having understood the basic statement and the overall statement, it is now time to talk about the sub-item, which is basically needless to say, because there is no particular use, and look at the following example:
<style type= "Text/css" >
Body{font-size:9pt; font-color:red} Body{font-family: Song body ; Background:white}
</style> |
You will find that we have made two statements on the label at the same time, yes! This is what we are going to say today, that is to say, on the same label, oh we can do two different statements, in CSS, this is OK! As for this is superfluous? Or is it more flexible? It depends on your habit of use! Basically, everyone's CSS writing habits are different.
Be careful of the following situations:
In the sub-item, there is a case for special attention, as follows:
<style type= "Text/css" >
body{font-size:9pt; font-color:red} Body{font-family: Song body; Font-color:blue}
</style> |
You found the red part! The same label makes a partial declaration, the result inside the style of the attribute has a group is the same (Font-color property, but the set value is different), then what will be the result? The text that is wrapped in the label is displayed in blue. We can try!