IE Box阴影显示1px边框效果

时间:2017-11-16 12:36:10

标签: html css

我已经在标记标记上应用了框阴影,以便在左右两侧提供额外的空间,除了IE以外所有其他浏览器看起来都很好。但是在IE中它显示了1px边框效果。对此有什么解决方案吗?



mark {
    font-size: 24px ;
    background-color: rgba(0,0,0,0.5);
    line-height: 48px;
    max-width:350px;
    color: #fff;
    -webkit-box-shadow: rgba(0,0,0,0.5) -15px 0 0 0, rgba(0,0,0,0.5) 15px 0 0 0;
    -moz-box-shadow: rgba(0,0,0,0.5) -15px 0 0 0, rgba(0,0,0,0.5) 15px 0 0 0;
    box-shadow: rgba(0,0,0,0.5) -15px 0 0 0, rgba(0,0,0,0.5) 15px 0 0 0;
}

<mark>Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum</mark>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

<style>
  mark {
    font-size: 24px ;
    line-height: 48px;
    max-width:350px;
    color: #fff;
    background-color: rgb(68,68,68); /* Needed for IEs */
    -moz-box-shadow: 5px 5px 5px rgba(68,68,68,0.6);
    -webkit-box-shadow: 5px 5px 5px rgba(68,68,68,0.6);
    box-shadow: 5px 5px 5px rgba(68,68,68,0.6);
    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3,MakeShadow=true,ShadowOpacity=0.30);
    -ms-filter: "progid:DXImageTransform.Microsoft.Blur(PixelRadius=3,MakeShadow=true,ShadowOpacity=0.30)";
    zoom: 1;
   }
</style>

<mark>Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum</mark>