可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks:
01 .test{
02 color:/*\**/#00f\9; /* IE8 */
03 }
04 .test,
05 .test:-moz-any-link{
06 color:#f60; /* Firefox2 */
07 }
08 .test,
09 .test:default{
10 color:#000; /* Firefox3 */
11 *color:#f00; /* IE7 */
12 _color:#0f0; /* IE6 */
13 }
可同时区分IE8、IE7、IE6、Firefox的CSS hacks: view source
print
?1 .test{
2 color:#000; /* Firefox */
3 color:/*\**/#00f\9; /* IE8 */
4 *color:#f00; /* IE7 */
5 _color:#0f0; /* IE6 */
6 }
view source
print
?1 .test{
2 color:#000; /* Firefox */
3 color:/*\**/#00f\9; /* IE8 */
4 *color:#f00; /* IE7 */
5 _color:#0f0; /* IE6 */
6 }
关于IE8的hacks:1
2 .test{
3 color:/*\**/#00f\9; /* IE8 only */
4 color:#00f\9; /* 适用于所有IE版本 */
5 }
原文地址:http://www.corange.cn/archives/2010/05/3627.html
本Blog文章除特别声明之外皆为原创文章,欢迎转载,转载请注明: 转载自JSSAY'S BLOG