After analysis and summary of the various users of the ineffective methods, with the following effective solution, perhaps there will be better and simpler hack, but for now this method can solve the immediate problem.
CSS compatibility has always been a headache for everyone, IE6, IE7 and FF have been very annoying, in the previous article, a lot of this knowledge introduced. Today to introduce IE8 CSS hack.
IE8 official version of the release, has been looking for a distinction between the IE8 version of the method. In Baidu search "IE8 hack" has more than 190,000 results, Google search has more than 2.43 million results, but hardly see any effective method for the IE8 official version, You know, there's a big difference between the IE8 and the beta in hack. And the network methods are almost all from the hands of one or two people, the most famous may have to count the linxz.cn hack picture, this picture is estimated by the domestic netizens reprinted hundreds of thousands of times, But the method currently in this picture is not valid for the IE8 official edition.
After analysis and summary of the various users of the ineffective methods, with the following effective solution, perhaps there will be better and simpler hack, but for now this method can solve the immediate problem.
Stop talking nonsense, come (the following IE8 refers to IE8 official edition, version number: 8.0.6001.18702):
"\9" Example: "margin:0px auto\9;". Here the "\9" can distinguish all IE and Firefox.
"*" IE6, IE7 can be identified. IE8, Firefox can't.
"_" IE6 can Identify "_", IE7, IE8, Firefox can not.
So, you can completely distinguish open IE6, IE7, IE8, Firefox.
What? still don't know how to differentiate. Okay, let's take a look at an example:
<! DOCTYPE <a href= "http://www.blue1000.com/bkhtml/c22/title=" html/javascript Tutorial ">HTML</a> Public"-//w3c DTD XHTML 1.0 transitional//en "" Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">