我在使用PIE和IE8时遇到了一个大问题。首先是CSS:
<!--[if lte IE 8]>
<style type="text/css">
*.article_image img {
position:relative;
border-radius:20px;
behavior:url(/js/PIE.htc);
}
</style>
<![endif]-->
HTML: <div class="innerfade">
<div class="article_image">
<a>
<img>
</a>
</div>
</div>
是使用JQUERY innerfade工具的"内部渐变"块的一部分。今天我想这就是造成麻烦的原因。这在IE10中运行良好,开发者工具设置为"IE8",显示模式为"IE8标准"。但不能在"真正的"IE8中工作。知道为什么吗?
直到我找到一个更好的解决方案或IE8不再使用,我使用这个丑陋的小变通:
<!--[if lte IE 8]>
<div style="position:absolute;"><img style="width:20px;height:20px;" alt="corner" src="template/left_top.png"></div>
<div style="position:absolute;bottom:0px;"><img style="width:20px;height:20px;" alt="corner" src="template/left_bottom.png"></div>
<div style="position:absolute;right:0px;"><img style="width:20px;height:20px;" alt="corner" src="template/right_top.png"></div>
<div style="position:absolute;bottom:0px;right:0px;"><img style="width:20px;height:20px;" alt="corner" src="template/right_bottom.png"></div>
<![endif]-->
工作好。但是导致大量的工作,如果你想改变背景颜色…