【发布时间】:2020-08-31 11:34:57
【问题描述】:
我将模糊滤镜应用于包装 div 的背景图像。出于某种原因,模糊过滤器也会应用于包装器 div 中的 img 元素。
#wrapper-5 {
background: url("https://i.picsum.photos/id/1062/600/400.jpg") no-repeat;
filter: blur(5px);
}
#img-5 {
clip-path: circle(30%);
filter: grayscale(80%);
}
<div id="wrapper-5">
<img id="img-5" src="https://i.picsum.photos/id/1062/600/400.jpg" width="600" alt="doggie" />
</div>
【问题讨论】:
-
你需要给子元素的z-index高于父元素,使其高于过滤效果
标签: css