I want to summarize CSS hack.

Source: Internet
Author: User

As the name suggests, IE6's classic hack is: an underscore "_", for example, _ color: # ff0000; but this example is placed at the bottom.

The hack of IE6 & 7 is: an asterisk "*", for example, * color: # ff0000. However, this should be placed before _ hack.

So someone summarized the figure below:

For the above image, it is transferred to me by someone else. It is worth noting that the second row is not used at all, and the third row should be written at the bottom of the style.

However, the hack of IE is provided here, and the problem is that the hack of other browsers also exists:

/* Firefox */<br/> @-moz-document URL-prefix () <br/>{# Firefox {display: block ;}} <br/>/* safari */<br/> @ media screen and (-WebKit-Min-device-pixel-ratio: 0) <br/>{# safari {display: block ;}} <br/>/* opera */<br/> @ media all and (-WebKit-Min-device-pixel-ratio: 10000 ), not all and (-WebKit-Min-device-pixel-ratio: 0) <br/> {head ~ Body # opera {display: block ;}} 

This is a summary of others: http://leeiio.me/css-hack-for-firefox-opera-safari-ie/

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.