当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > 网页制作需要了解的IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks

CSS样式表
CSS Sprites 技术分析
csdn 博客的 css样式 v5
CSS 实例实现清除浮动
CSS Sprites 圆角制作教程
关于css @import url()总结
一个非常精典的纯CSS漫画,登峰造极.
css 背景透明 实现代码
css 横排 实现代码
CSS 像素图制作攻略
CSS 实现绝对底部一个完美解决方案
CSS 代码质量提高的10条实用技巧
CSS 扑克牌效果实现代码
margin 负值引起的层级(z-index)问题
关于Firefox下截取后省略号的问题
14个华丽的javascript图表资源和插件
IE img多余5像素空白解决方法
css 不同媒介的显示样式控制方式
打印网页中不打印页面中的某些内容
CSS Sprites 图片整合技术分析
文字超过宽度显示省略号(无js全兼容)

CSS样式表 中的 网页制作需要了解的IE8、IE7、IE6、Firefox3、Firefox2的CSS hacks


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 187 ::
收藏到网摘: n/a


代码如下:

.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版本 */
}