网上最大众华的解决ie6无法显示png背景图片透明问题的方法就是用
“filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src=’images/liBack.png’,no-repeat); background:none;”。
用了上面那句话会导致链接无法点击,所以需给链接加个positon:relative。
如下所示:
#nav li {
width:130px;
text-align:center;
height:40px;
background:url(../images/liBack.png) no-repeat center;
line-height:40px;
font-family:’宋体’, Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:bold;
float:left;
}
* html #nav li{
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src=’images/liBack.png’,no-repeat); background:none; }
#nav li a{
position:relative;
}
7 Comments
很多人都放弃IE6了哦
不过这个还是很实用的,
[回复]
admin Reply:
九月 15th, 2009 at 23:58
@小Q, 关键是现在还有很多人在用ie6啊,所以还是得考虑他们啊
[回复]
多么无奈的事情啊!
[回复]
admin Reply:
九月 15th, 2009 at 23:59
@Louis Han, 是啊,调试ie6简直是痛苦
[回复]
又有个方法了,哈哈
[回复]
这样的话对连接多的页面就麻烦了
[回复]
admin Reply:
九月 15th, 2009 at 23:59
@Hobo, 有啥高招么?
[回复]
Hobo Reply:
九月 16th, 2009 at 08:12
@admin, 哈哈我的帖子,试试不用你那个方法做http://www.nethobo.com/2009/09/12/two-ways-to-solve-the-png-transparent-background-in-ie-not-displayed-properly-under-the-question-of/
[回复]
admin Reply:
九月 16th, 2009 at 21:24
@Hobo, 我用过你这方法,不知道怎么搞的,没有效果
[回复]
以前就遇到这个问题的。。不过现在已经放弃IE6了。。现在用的是IE8+FF..
[回复]
admin Reply:
九月 16th, 2009 at 21:23
@阿东, 有些情况下做出来的东西必须得兼容ie6啊,没办法
[回复]
搜藏了 以后用的到
[回复]
admin Reply:
九月 16th, 2009 at 22:21
@雅丹地貌, 知识就是积累起来的
[回复]
好方法,留着以后用,呵呵。
[回复]
admin Reply:
九月 16th, 2009 at 22:20
@太阳博客, 您网页设计也会啊,越来越佩服您老啦
[回复]