CSS hack usage Summary

Source: Internet
Author: User
1. Set Properties in IE6 as long as you write * html. Class {} Here. clss is changed to the name you want. It can also be an ID.
2. Instance
P {color: red; * color: pink; _ color: yellow; _ color/**/: green ;} first color all browsers readable second color all IE series browsers readable third color only ie5, IE6 readable fourth only ie5 readable
3. Good hack method in IE7: Use "* + html "!
Example: XML/htmlCodeExample source code # example {color: #333;}/* Moz */* html # example {color: #666 ;} /* IE6 */* + html # example {color: #999;}/* IE7 */
The font color in Firefox is displayed as #333, the font color in IE6 is displayed as #666, And the font color in IE7 is displayed as #999, and they do not affect each other! This can also be done, and it is applicable to In-line writing (<Div style = ".................... ">): XML/html code width: 100px;/* Mozilla */+ width: 110px;/* IE7 */_ width: 120px; /* IE6 */The sequence cannot be broken, because the more compatible the above, the more IE6 recognizes "+ ".

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.