您好!感谢您对火狐产品的支持!
针对firefox 的css样式
现在大部分都是用!important.hack,对于firefox测试可以正常显示,
现在写一个CSS可以这样:
#1 { color: #333; } /* Moz */
* html #1 { color: #666; } /* IE6 */
*+html #1 { color: #999; } /* IE7 */
那么在firefox下字体颜色显示为#333。
火狐浏览器使用的是Gecko内核,是一款开源、安全的浏览器,拥有非常强大的扩展功能,可以根据自己的需求定制浏览体验。您可以在火狐社区了解更多内容。
希望我的回答对您有所帮助和得到您的采纳。
CSS可以参考W3C标准 http://www.w3school.com.cn/css/
第一种,是CSS HACK的方法
height:20px; /*For Firefox*/
*height:25px; /*For IE7 & IE6*/
_height:20px; /*For IE6*/
注意顺序。
这样也属于CSS HACK,不过没有上面这样简洁。
#example { color: #333; } /* Moz */
* html #example { color: #666; } /* IE6 */
*+html #example { color: #999; } /* IE7 */
第二种是使用IE专用的条件注释
第三种css filter的办法,以下为经典从国外网站翻译过来的。.
新建一个css样式如下:
#item {
width: 200px;
height: 200px;
background: red;
}
新建一个div,并使用前面定义的css的样式: