Home > Article > Web Front-end > CSS hack to distinguish between IE6, IE7, and firefox_Experience exchange
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;
Difference between FF, IE7 and IE6:
background:orange;*background:green !important;*background:blue;
Note: IE can recognize *; standard browsing The browser (such as FF) cannot recognize *;
IE6 can recognize *, but not !important,
IE7 can recognize both * and !important;
FF cannot recognize *, but can recognize !important ;
IE6 IE7 FF
* √ √ ×
!important × √ √
-------------------------- -------------------------------------------------- -----
One more thing to add, the underscore "_",
IE6 supports underscores, but neither IE7 nor firefox supports underscores.
So you can also distinguish IE6, IE7, firefox in this way
: background:orange;*background:green;_background:blue;
Note: No matter what method it is written, The order is that firefox is written at the front, IE7 is written in the middle, and IE6 is written at the end.