CSS IE6 IE7 ff CSS hack use tips _ Experience Exchange

Source: Internet
Author: User
FF Browser
. test{
height:20px;
Background-color:orange;
}
IE7 Browser
*+html. test{/*ie7*/
height:20px;
Background-color:blue;
}

IE6 Browser

*html. test{/*ie6*/
height:20px;
Background-color:black;
}

You can see that FF is the most obedient browser through the CSS code above. In IE6 and IE7 if you want to use hack you must precede the tag HTML with the husband level.
Here is very good memory, IE6 plus *html, and IE7 plus *+html, hinted added a version.
The advantage of CSS hack for class and ID is that it does not have to take into account the sequence, and it is easy for management and other people to accept, and this kind of hack can realize the control like JS browser version.
  • 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.