Some problems encountered in CSS hack

Source: Internet
Author: User

Previously, when a Web page was compatible, the layout under IE8,IE9 was different. Just want to do a CSS hack for IE8,IE9. Online Search for information. \9 and \9\0 to distinguish IE8,IE9. I want a compatible property when Margin-top. But found the effect ie8,ie9 the same. I was confused at the time. Think this method is wrong. And then I'm going to use this method to color-compatible. But found that there is a difference under the IE8,IE9. I was confused. I guess the reason is that this hack property only supports a subset of the style's properties. Later I went to specialize in finding compatible IE9 methods. Found on the Internet:

:    color:}  
But after using this method. Found to open the page under Ie10. This method is also found to be suitable for ie10. So he continued to search for Ie10 's exclusive hack. After slowly looking, also finally found. Add the script first.





</script><!--<! [endif]-->
Above is the conditional compilation with IE private (conditional compilation) combined with conditional comments to provide hack for Ie10: The script inside the IE exclusion condition comment to ensure that ie6-9 does not recognize it, then it detects the feature named @ cc_on.

Then continue to add style to the element






Some problems encountered in CSS hack

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.