Css hack + _*! Important

Source: Internet
Author: User

Common css hack:

CSS hack has different understandings of CSS parsing in different browsers, such as Internet Explorer 6, Internet Explorer 7, and Mozilla Firefox, which leads to different page effects, not what we need
Page effect.
At this time, we need to write different CSS for different browsers so that they can be compatible with different browsers at the same time, so that we can get the desired page effect in different browsers.

+ Background-color: red;/* ie10 ff not recognized */


* Background-color: red;/* ie10 ff not recognized */


_ Background-color: red;/* ie 5 6 recognition */


Background-color: red! Important;/* ie ff supports ie6 not */


The above code is tested in winnt, and xp is slightly different.

 

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.