Css! Summary of important usage, cssimportant
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
What should I do when I want to increase the class priority? In CSS! The role of important
* It can be recognized by Ie browsers, but not by firefox ;! Important can only be recognized by Ie7.0 and firefox, but Ie6.0 cannot be applied successfully. (1) differences between ie and firefox: border: 2px solid # f00; * border: 1px solid # f00; (2) differences between Ie6.0, Ie7.0, and firefox: border: 1px solid # f00! Important; border: 2px solid # f00; in (1), * is placed after it because ff is not recognized *, so it is set only once; after two border settings are performed in the ie series, the last attribute overwrites the previous one, so it is a pixel border. In (2), the reason why! Important is set in the first border because it increases the priority of this border. Even if it is set at one or even N times later, Ie6.0 does not accept this rule, as a result, it applies the second border setting, that is, it overwrites this principle for the first time, not it does not recognize it! Important; so its border is a 2 pixel red box. this is a simple application:
In css # different from the usage
The id is used for unique pages with the same style. If the style is not unique, the class is used. The id can only be referenced once. The class can be referenced once or more. js positioning uses the id, which is so simple ..
Id can be defined once on the page
The class can be one or more times
That is to say, if it is defined once, id and class can be used as you like ..
Use id #. It is not standard and cannot be parsed.
Class.