<! DOCTYPE HTML public -//w3c//dtd XHTML 1.0 transitional//en " HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD > < HTML Xmlns= " http://www.w3.org/1999/xhtml " > content-type " Content= " text/html; charset=utf-8 " / > <title> Untitled Documents </title> <style> <!--! important only Ie7.0 and Firefox can be identified, but Ie6.0 cannot be applied successfully. Important elevation priority (or as forced redefinition--
<!--! Important is the syntax defined by CSS1, which is to improve the application priority of the specified style rule (see: W3.org's explanation).
The syntax format {srule!important}, which is written in the last face of the definition, for example: box {color:red!important;}
If we define a style like this:
#box {background-color: #ffffff! important; background-color: #000000
--#box div {color:red;}. important_false {color:blue;}. important_true {Color:blue! Important } #box2 {background-color: #cccccc!important; Background-color: #000000
<!--Firefox: The following paragraph is red if placed on top, and blue if placed at the bottom. The
indicates that if placed on top, #box div overrides #idcolor, this is the priority of the ID. The
and. Important_false's class priority is less than the ID and does not overwrite the #box div.
if placed at the bottom, the #idcolor is not overwritten. Important_false.
If id= "Idcolor" is not set, it is blue. The
description. Important_false covers the #box div IE7: #idColor放在最下面, it's red. The
is placed at the bottom and is red, removing the id attribute. It's red, too.
No description is overwritten
#box Div. --#idColor {color:gray;} </style>
This line uses important at the end. The class priority is less than the priority of the ID. IE7 is red, Firefox is blue. </div> <div class= "Important_true" > This line uses important</div> </div> <div id= "Box2" > In different browsers, the color of this line of words should be different! Ie7,firefox is red. IE6 is blue </div> </body>