CSS Hack, csshack

Source: Internet
Author: User

CSS Hack, csshack

Css hack is widely used on the Internet. It is mainly caused by different IE versions. Do not use css hack as much as possible. You can use css hack if you cannot adjust it. I believe that with the elimination of earlier IE versions, css hack will not be used either.

Class internal HACK

IE6 identification --> underline "_" and star number "*"
IE7 identification --> asterisk "*"

Selector HACK

IE6 identification --> * html. class {}
IE7 identification --> * + html. class {} Or *: first-child + html. class {}. And so on.

HACK header reference:

<! -- [If IE]>
This text is only displayed in IE browser
<! [Endif] -->


<! -- [If IE 6]>
This text is only displayed in IE6 Browser
<! [Endif] -->


<! -- [If gte IE 6]>
This text is only displayed in Internet Explorer 6 or later versions.
<! [Endif] -->

<! -- [If! IE 8]>
This text is displayed in a non-IE8 Browser
<! [Endif] -->

<! -- [If! IE]>
This text is only displayed in non-ie browsers
<! [Endif] -->

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.