Selector grouping
Selectors can be grouped, grouped selectors can share the same declaration, and a comma separates the selectors that need to be grouped. For example:
{ color: green; }
Inheritance and its problems
In general, child elements inherit the attributes of the parent element. But this situation is sometimes not allowed, for example, NETSCAPE4 does not support inheritance. Fortunately, we also have the "be kind to Netscape4" redundancy rule to deal with problems that cannot be inherited.
Body { font-family: Verdana, Sans-serif; } p, TD, UL, OL, Li, DL, DT, DD { font-family: Verdana, Sans-serif; }
This will waste some users ' broadband, but it solves the problem that cannot be inherited.
Get rid of inheritance
If the child element wants to get rid of the inheritance is the same as above, as long as the child element to redefine its rules.
Three CSS Advanced Syntax