网络编程
位置:首页>> 网络编程>> 网页设计>> 10个糟糕的IE Bug及其修复(2)

10个糟糕的IE Bug及其修复(2)

作者:iifksp 来源:蓝色理想 发布时间:2010-05-13 16:26:00 

标签:IE,bug,CSS

4、Bicubic图像缩放(Bicubic Image Scaling)

你会喜欢这个的。IE那糟糕图像缩放让你很困扰?如果你拿IE和其他浏览器比较,IE缩小的图像看起来不如其他浏览器。

解决方法


img { -ms-interpolation-mode: bicubic; }



5、 PNG透明(PNG Transparency)

我猜每个人都知道这个,但我仍把它列在这里,作为以后的参考。
所以如果你想要使用透明图像并且GIF不能给你想要的质量,你会需要这个对PNG的hack。你必须意识到,如果你使用一张PNG图像作为背景,你将不能设置背景的位置。

解决方法:

img { 
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...); 
}

6、 IFrame透明背景 (IFrame Transparent Background)

在firefox和safari里你应该不会遇到这个问题因为默认情况下,iframe的背景被设置为transparent,但是在IE里,却不是如此。你需要用到allowTransparency 属性并且加入下面的CSS代码来达成目的。

解决方法


/* in the iframe element */ 
<iframe src="content.html" allowTransparency="true"> 
</iframe> 

/* in the iframe docuement, in this case content.html */ 
body {
    background-color:transparent;    
}


7、禁用IE默认的垂直滚动条(Disabled IE default Vertical Scroll bar)

默认情况下,即使内容适合窗口大小,IE(译注:IE6/7)也会显示垂直滚动条。你可以使用overflow:auto,让滚动条只在你需要时出现。

html {
    overflow: auto; 
}

 

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com