IE8 7 6 css hacks

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.