我已经在这里申请了ie PNG:http://www.twinhelix.com/css/iepngfix/
所以我可以在我的CSS中使用透明的PNG背景图片。它可以在div上工作,但问题是当我给无序列表(ul)一个透明的背景时,它就不能工作了。
下面是标记:
<div id="footer">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
<p>© 2009 Your Name</p>
</div>以下是样式表的相关部分:
/* IE PNG fix */
img, div, ul { behavior: url('/css/iepngfix/iepngfix.htc') }
#footer {
width: 876px;
margin: 0 auto;
background: none;
text-align: center;
line-height: 1.5em;
font-size: .8em;
}
#footer ul {
padding: 40px 0 13px;
background: url('wrapper-bottom.png') center top no-repeat;
}
#footer p {
padding-bottom: 15px;
}我还尝试将background: transparent;添加到#footer div中,但没有成功。适用于div的其他PNG图像,但在wrapper-bottom.png下有一个灰色背景(#333),这是大多数网站内容区域的背景,但我特别声明了background: none;对于#footer,应该没有:(
编辑:实际上,当我没有指定#footer div的高度时,整个页脚都是灰色背景……
编辑:在我发了这篇文章几分钟后,我自己设法解决了这个问题。不过,我使用了一个非常丑陋的技巧:
#footer {
height: 0;
}
#footer ul {
height: 30px;
}这似乎适用于所有IE版本。
发布于 2009-09-08 18:44:46
尝试使用Unitpng Fix。
它很容易实现,也可以与后台png一起使用。
Check out this link
https://stackoverflow.com/questions/1394316
复制相似问题