2 回答

TA贡献1862条经验 获得超6个赞
首先你确定你的行高大于你的字体大小了吗,另外最好行高用倍数来写,比如font-size:15px的话,行高写line-height:2;(它的两倍高)
另外,正常情况下来说样式写的正确的话是不会失效的,所以,好好检查你写的代码

TA贡献1789条经验 获得超10个赞
\9是为了解决兼容性问题用的;这里的意思是IE6、IE7、IE8都是调用这个样式,但其他的浏览器就不兼容这个样式,
给你举例:
.color{ background-color: #CC00FF; 所有浏览器都会显示为紫色
background-color: #FF0000\9;IE6、IE7、IE8会显示红色
*background-color: #0066FF; IE6、IE7会变为蓝色
_background-color:#009933; IE6会变为绿色
区别FF,IE7,IE6:
background:green !important; background:orange; *background:blue;
IE6能识别*,但不能识别 !important,
IE7能识别*,也能识别!important;
FF不能识别*,但能识别!important;
另外再补充一个,下划线”_“,IE6支持下划线,IE7和firefox均不支持下划线。
于是大家还可以这样来区分firefox,IE7,IE6
background:green!important; *background:orange; _background:blue;
注:不管是什么方法,书写的顺序都是firefox的写在前面,IE7的写在中间,IE6的写在最后面。
- 2 回答
- 0 关注
- 804 浏览
添加回答
举报