可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks

可同时区分IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks:
.test{
color:/*\**/#00f\9 ; /*IE8*/
}
.test,
.test:-moz-any-link{
color:#f60; /*Firefox2*/
}
.test,
.test:default{
color:#000; /*Firefox3*/
*color:#f00; /*IE7*/
_color:#0f0; /*IE6*/
}
color:/*\**/#00f\9 ; /*IE8*/
}
.test,
.test:-moz-any-link{
color:#f60; /*Firefox2*/
}
.test,
.test:default{
color:#000; /*Firefox3*/
*color:#f00; /*IE7*/
_color:#0f0; /*IE6*/
}
可同时区分IE8、IE7、IE6、Firefox的CSS hacks:
.test{
color:#000; /*Firefox*/
color:/*\**/#00f\9; /*IE8*/
*color:#f00; /*IE7*/
_color:#0f0; /*IE6*/
}
color:#000; /*Firefox*/
color:/*\**/#00f\9; /*IE8*/
*color:#f00; /*IE7*/
_color:#0f0; /*IE6*/
}
关于IE8的hacks:
.test{
color:/*\**/#00f\9; /*IE8only*/
color:#00f\9; /* 适用于所有IE版本 */
}
color:/*\**/#00f\9; /*IE8only*/
color:#00f\9; /* 适用于所有IE版本 */
}
本文永久链接 http://www.tangblog.info/2009/09/5/distinguish_explorer.html
随机文章