解决此办法的最简单的方法是,在style中添加:display:inline;
给你介绍小技巧。可以使用以下办法来书写兼容浏览器的css代码:
第一种:
.div{
background:orange;/*ff*/
*background:green!important;/*ie7*/
*background:blue;/*ie6*/
}
第二种:
.div{
margin:10px;/*ff*/
*margin:15px;/*ie7*/
_margin:15px;/*ie6*/
}
第三种:
#div{color:#333;}/*ff*/
*html#div{color:#666;}/*IE6*/
*+html#div{color:#999;}/*IE7*/
给你介绍小技巧。可以使用以下办法来书写兼容浏览器的css代码:
第一种:
.div{
background:orange;/*ff*/
*background:green!important;/*ie7*/
*background:blue;/*ie6*/
}
第二种:
.div{
margin:10px;/*ff*/
*margin:15px;/*ie7*/
_margin:15px;/*ie6*/
}
第三种:
#div{color:#333;}/*ff*/
*html#div{color:#666;}/*IE6*/
*+html#div{color:#999;}/*IE7*/
本文介绍了三种CSS代码写法,旨在实现不同浏览器间的兼容性,包括使用内联样式、*伪元素和html前缀等方法,确保网页在FF、IE6、IE7等浏览器上正常显示。
1万+

被折叠的 条评论
为什么被折叠?



