Some simple css hack tests were performed on IE8, IE7, IE6, and Firefox2.0.0.12. For the moment, IE8 stands for IE8 beta1 only ).
CSS definition: p {color: # f00 ;}
Xhtml structure: <p> text </p>
It mainly tests the result reports of using hack in different browsers in the color of "text:
* Html p {color: # f00;} supports IE6 and does not support FF IE7 IE8b.
* + Html p {color: # f00;} supports IE7 IE8b and does not support FF IE6
P {* color: # f00;} supports IE7 IE6 and does not support FF IE8b
Related tests:
In IE8, the substring matching attribute selector (substring matching attribute selectors) is added in CSS3. The matching rules are similar to those in Regular Expressions:
E [att ^ = 'val'] // The substring starts with 'val'
E [att $ = 'val'] // The substring ends with 'val'
E [att * = 'val'] // The substring contains 'val'
IE8 supports the vast majority of basic CSS2.1 selectors, including but not limited to [: first-line] and [: first-letter].
For the generated content section in CSS2.1, that is, adding text content by using pseudo elements: before AND: after, IE8 does not support completely.
For opacity and RGBA supported in almost other browsers, IE8 still does not.
HACK originally used to distinguish IE is basically invalid in IE8 (for example, * property: value, * property: value, etc ).
The original list-item whitespace bug of IE still exists in IE8.
The original IE z-index bug still exists in IE8.
New bug in IE8: When line-heigth is smaller than normal, the excess parts will be dropped.
Display: table is still not supported in IE8.
In IE8, the border's transparent value is still not supported.
In IE8, @ import only supports layer-3 nesting.
Border's transparent in IE8 is not supported
New BUG in IE8: line-heigth BUG
/*/P {color: # 1e90ff}/*/Only hack for IE8, which can be an attribute or a class