最近又搞浏览器兼容性的问题了,翻了下以前的记录,不是很全,所以找了些资料,总结下来:

#hack{
color:red; /* All browsers */
color:red !important;/* All browsers but IE6 */
_color:red; /* Only works in IE6 */
*color:red; /* IE6, IE7 */
+color:red;/* Only works in IE7*/
*+color:red; /* Only works in IE7 */
color:red\9; /* IE6, IE7, IE8, IE9 */
color:red\0; /* IE8, IE9 */
color:red\9\0;/*Only works in IE9*/
}
. ie10 #hack{
color:red; /* Only works in IE10 */
}

以上代码来自:http://codemug.com/html/css-hacks-for-ie6ie7ie8ie9-and-ie10/

Related Posts: CSS Hacks for IE6,IE7,IE8,IE9,IE10 :