The browser compatibility solution after CSS Hacks is abandoned

Source: Internet
Author: User

If you have read the article "CSS ninja: Safe CSS hacks cheats" posted on mango xiaozhan, You should have understood the skills to replace CSS Hacks with IE conditional annotations. We have recently considered using this solution in projects.

Generally, three IE versions (IE6/7/8) are required for browser compatibility. Of course, more derivative versions will be available after IE9 is gradually pushed to the market. So now I only consider IE7 ~ Compatibility of version 9. The code for commenting on the involved conditions is as follows:

<! DOCTYPE html> <! -- [If lt IE 7]>  

The usage instructions are as follows:

. Test {/* style for non-ie browsers */}. ie. test {/* style for all ie versions */}. ie6. test {/* style for ie6 */}.... ie9. test {/* style for ie9 */}

In the previous article, some people proposed using PHP to determine UA parameters and dynamically output style sheets. Although this method is concise and clear, it is coupled with the backend code, I think it is not the same thing. In many cases, the page is templated in actual applications, and dynamic output is not very suitable.

In addition, the domestic large dual-core high-speed Secure Shell browser has not been tested, this requires further understanding.

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.