CSS compatibility has always been a headache for everyone. IE6, IE7 and FF have already troubled everyone. In the previous articles of 52CSS.com, a lot of knowledge in this area was introduced. Today I will introduce to you the CSS hack of IE8.
Since the official version of IE8 was released, I have been looking for a way to distinguish the official version of IE8. Searching for "IE8 hack" on Baidu has more than 190,000 results, and searching on Google has more than 2.43 million results, but I have hardly seen any. The effective method is for the official version of IE8. You must know that there is a big difference between the official version and the beta version of IE8 in terms of hacks. Moreover, almost all the methods on the Internet are created by one or two people, and the most famous one is probably that Here is a picture of the hack from linxz.cn. This picture is estimated to have been reprinted hundreds of thousands of times by domestic netizens, but the method in this picture is currently invalid for the official version of IE8.
After analyzing and summarizing various ineffective methods from netizens, we have the following effective solutions. Maybe there will be better and simpler hacks in the future, but for now, this method can solve the urgent need.
No more nonsense, here comes (the following IE8 refers to the official version of IE8, version number: 8.0.6001.18702):
Example Source Code
[www.52css.com] "9" Example: "margin:0px auto9;". The "9" here can distinguish between all IE and FireFox.
"*" IE6 and IE7 can recognize it. IE8 and FireFox cannot.
"_" IE6 can recognize "_", but IE7, IE8, and FireFox cannot.
In this way, IE6, IE7, IE8, and FireFox can be completely distinguished.
What? Still don’t know how to tell the difference. Well, let’s look at an example: