您现在的位置是:网站首页>列表内容

网页制作需要了解的IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks_浏览器兼容教程_CSS_网页制作_

2021-08-29 18:04:50 1822人已围观

简介 可同时区分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 */
}

可同时区分IE8、IE7、IE6、Firefox的CSS hacks:

CSS代码

复制代码
代码如下:

.test{
color:#000; /* Firefox */
color:/*\**/#00f\9; /* IE8 */
*color:#f00; /* IE7 */
_color:#0f0; /* IE6 */
}

关于IE8的hacks:

复制代码
代码如下:

CSS代码
.test{
color:/*\**/#00f\9; /* IE8 only */
color:#00f\9; /* 适用于所有IE版本 */
}
发布内容
-六神源码网