CSS hack: distinction IE6, IE7, firefox

Distinguish between different browsers, CSS hack writing:


The difference between IE6 and FF :
       background: orange; *background: blue;

The difference between IE6 and IE7 :
       background: green  !important;background: blue;

The difference between IE7 and FF :
       background: orange*background: green;

The difference between FF , IE7 , IE6 :
       background: orange; *background: green  !important; *background: blue;

Note: IE can identify *; standard browser (e.g., FF) * can not be recognized;
* IE6 recognizes, but does not recognize! Important,
* IE7 can identify, but also to identify important!;
* FF does not recognize, but can identify Important!;


IE6 IE7 FF
* ×
!important ×



In addition to add one underscore " _ ",
IE6 support underlined, IE7 and firefox not support underlined.

So we can distinguish this IE6 , IE7 , firefox

background: Orange ; * background: Green ; _ background: Blue ;

Note: Whatever the method, the order is written in the EDITORIAL firefox, IE7 written in the middle, IE6 is written in the rearmost

Reproduced in: https: //www.cnblogs.com/tufan/archive/2009/09/22/1571685.html

Guess you like

Origin blog.csdn.net/weixin_33755649/article/details/93643019