最近发现safari中overflow:hidden对CSS模糊滤镜溢出隐藏无效,经测试,也可以用SVG模糊滤镜代替CSS模糊滤镜,说明safari浏览器中overflow:hidden对SVG模糊滤镜溢出隐藏是有效的
解决方法示例:
<div style="width:450px; height:160px; overflow:hidden; margin-top:50px; position:relative;">
<!--背景图-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="500" style="position:absolute;left:0; top:50%;margin-top:-250px;">
<defs>
<filter id="blur">
<!--stdDeviation 模糊值-->
<feGaussianBlur stdDeviation="5" />
</filter>
</defs>
<!--图片-->
<image xlink:href="http://pic9.nipic.com/20100818/5514989_172647012992_2.jpg" x="0" y="0" height="100%" width="100%" filter="url(#blur)" />
</svg>
<p style="position:relative;">测试测试测试 </p>
</div>
详解地址:http://blog.csdn.net/qq_16494241/article/details/51578349