Examples of CSS Hack code: Compatible with IE5.0, IE5.5, IE6.0, IE7.0, FF1.5,

Source: Internet
Author: User
Tags versions

This CSS Hack code example intuitively shows the use of hack in browsers of various versions. Compatible with IE5.0, IE5.5, IE6.0, IE7.0, FF1.5, and FF2.0.
The official simplified Chinese version of IE7.0 has been released. For those who often interact with webpages, the problem of webpage compatibility also arises. A significant change in IE7.0 is support! Important is a good thing, but it is also widely used in the Internet Explorer 6 era! Important has brought a lot of problems to the web page makers who deal with IE and FF, and Noker has also encountered this problem. So I read the online materials and wrote the following: this is compatible with most mainstream browsers today, overwrite the Hack code of most users!
Compatible browser versions: IE5.0, IE5.5, IE6.0, IE7.0, Firefox1.5, and FireFox2.0
CSS code: (pay attention to the sequence of Hack code)

The code is as follows: Copy code
# Test {
Width: 300px;
Height: 100px;
Background: # DDD! Important;/* FF */
Background: # FF0;/* IE5.0 */
}
# Test/* IE5.5 + */{
* + Background: # C0F! Important;/* IE7.0 */
* Background: # F00;/* IE6.0 */
* Background/* IE5.5 */: # F90;
}
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.