IE8bug

1.background-size属性
background-size 属性规定背景图像的尺寸。取值:cover|contain|60px 80px;
PM给的图尺寸是2倍div的尺寸,使用:

width: 11px;
height: 6px;
background-repeat: no-repeat;
background-size: cover;
background-image: url(a.png);//图片实际尺寸:宽22px,高12px

但是background-size属性不支持IE8及以下,所以需要添加:

width: 11px;
height: 6px;
background-repeat: no-repeat;
background-size: cover;
background-image: url(a.png);//图片实际尺寸:宽22px,高12px
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./a.png',  sizingMethod='scale');

注意这两个路径要一样,并且是绝对路径。
2.IE8对标签进行严格检查:

<i><i></i></i>

在IE8不能正常展示
3.IE8图片添加opacity属性 会出现黑色边框,解决方法:

img{
 border-style:none;
}
此条目发表在CSS分类目录。将固定链接加入收藏夹。

发表评论

邮箱地址不会被公开。 必填项已用*标注