Css 透明背景问题IE8、IE7
为我的菜单使用图标(.png透明背景)。IE9、Chrome、Firefox、safari、opera没有任何问题,但如果我用IE7或IE8打开页面,图像周围会有一个破损的黑色边框。CSS代码Css 透明背景问题IE8、IE7,css,internet-explorer-8,internet-explorer-7,png,background-image,Css,Internet Explorer 8,Internet Explorer 7,Png,Background Image,为我的菜单使用图标(.png透明背景)。IE9、Chrome、Firefox、safari、opera没有任何问题,但如果我用IE7或IE8打开页面,图像周围会有一个破损的黑色边框。CSS代码 .menu-item1{ background:url(img/spriteimage.png) no-repeat 0 0; height:20px; width:20px; opacity:0.5; } 我怎样才能解决这个问题 IE7和IE8对alpha透明胶片具有本机PNG支持
.menu-item1{
background:url(img/spriteimage.png) no-repeat 0 0;
height:20px;
width:20px;
opacity:0.5;
}
我怎样才能解决这个问题 IE7和IE8对alpha透明胶片具有本机PNG支持,但一旦不透明度进入图片,它就会崩溃 尝试伪造背景图像或将其设置为blank.gif,而不是使其透明
background:url(blank.gif);
或
/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 7 */
filter: alpha(opacity=50);