-
-
Save hemantajax/1994580 to your computer and use it in GitHub Desktop.
ie hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selector{ | |
property:value; /* all browser */ | |
property:value\9; /* all IE */ | |
padding:8px\0; /* ie8-9 */ | |
*padding:5px; /* ie6-7 */ | |
+property:value; /* IE7 */ | |
_property:value; /* IE6 */ | |
} | |
<!--[if !IE]>NOT IE<![endif]--> | |
<!--[if IE]>IE only<![endif]--> | |
<!--[if IE 8]>不错不错,挺先进的嘛,使用IE8呢!文字是褐色的。<![endif]--> | |
<!--[if IE 7]>你,IE7,红色文字!<![endif]--> | |
<!--[if IE 6]>孩子,虽然显示的是绿色文字,不过,IE6可不是好东西呢!<![endif]--> | |
// 以jQuery为例,检测是否是IE6,是则加上class="ie6" | |
if ($.browser.msie && $.browser.version = 6 ) { | |
$('div').addClass('ie6'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment