当前位置:编程学习 > html/css >>

IE6 中div的background-image图片高度被拉伸了,怎么解决?其他浏览器正常

代码如下background-image:url(images/listicon.gif);width:4px;height:6px;display:inline-block;_display:inline;
追问:加上no-repeat后图片显示不出来了,怎么回事呢很遗憾,加入no-repeat后图片不显示了IE8和ff chrome等没问题,就IE6这样,IE7没试_display:inline;是兼容IE6的,解决IE6对inline-block支持不好的bug
跟图片一点关系都没有
答案:background:url(images/listicon.gif) left top no-repeat;
其他:background:url(images/listicon.gif) no-repeat;width:4px;height:6px;display:inline-block;_display:inline;

试试看这样写 background-image 不可能把图片拉伸,你图片有问题吧? _display:inline;这个东西去掉 

上一个:南京哪里可以做网站?DIV|+CSS,NET2.0开发,请推荐,谢谢。
下一个:3个DIV标签怎么,并排,等高,如图

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,