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; }
|