There are many ways to do this online, for example, after testing the following conclusions, superfluous words are not said, straight into the topic:
1. All the inference IE browser
Positive solution: This is only recognized by the Le Browser, non-IE browser is not recognized.
<!--[If ie]>
<style type= "Text/css" >
.../* Detailed style */
</style>
<! [endif]-->
Misunderstanding: The following wording IE and non-IE browser can recognize
<!–[if ie]>
<style type= "Text/css" >
.../* Detailed style */
</style>
<! [endif]–>
2. Infer Non-IE browser
Myth 1: This type of notation. IE and non ie are not recognized
<!--[if! Ie]>
<style type= "Text/css" >
.../* Detailed style */
</style>
<!--<! [endif]-->
Myth 2: The following wording IE and non-IE browser can recognize
<!–[if! Ie]><!–>
<style type= "Text/css" >
.../* Detailed style */
</style>
<!–<! [endif]–>
Finally solved the way:
Write a style that all browsers recognize, and then write a style with the same name that only IE can recognize, so that you can distinguish between IE and non-ie effects.
I used to solve the difference between IE browser and non-ie browser border differences, style processing methods such as the following:
<!–[if! Ie]><!–>
<style type= "Text/css" >
. divbody{
margin-top:4px;
}
</style>
<!–<! [endif]–>
<!--[If ie]>
<style type= "Text/css" >
. divbody{
margin-top:0px;
}
</style>
<! [endif]-->
Not found right now only it is not the wording of IE browser recognition, small partners have a good way. Mr. Wang told the appreciation!
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
How CSS hack distinguishes between all IE browsers and non-IE browsers