Home  >  Article  >  Web Front-end  >  CSS hack to distinguish between IE6, IE7, and firefox_Experience exchange

CSS hack to distinguish between IE6, IE7, and firefox_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:06:131205browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn