CodeExample:
# BG {Background: # CCC; filter: alpha (opacity = 70); opacity: 0.7; width: 100%! Important; width: 180%; position: absolute; left: 0px; top: 0px; display: none; Z-index: 1 ;}
* + Html # BG {width: 180%! Important;/* IE7 */}
In the supported sequence of CSS adjustment, Firefox-> IE6-> IE7
1. Firefox is supported first
In Firefox! The important attribute has the highest priority (IE6 and IE7 cannot be recognized ).
Therefore, in the code snippet above, the width parameter recognized by Firefox is width: 100%.
2. ie support
2.1 cannot be parsed in IE6! Important attribute, so IE6 will discard this setting and parse the following width: 180%
Therefore, in the preceding code snippet, the width parameter recognized by IE6 is set to width: 180%.
2.2 cannot be parsed in IE7! Important attribute, so IE7 will discard this setting and parse the following width: 180%, and then there will be a unique * + HTML of IE7 (the element property will keep up with it after it ends! Important, that is, when * + HTML and! When important is used at the same time, it is unique to IE7), so the width: 180% configured later will overwrite the previously set width: 180%
Therefore, in the preceding code snippet, the width parameter recognized by IE7 is set to width: 180%.