【发布时间】:2016-10-07 22:22:56
【问题描述】:
当我将模糊滤镜应用于我的标记时,边缘不会被模糊。我希望整个区域都变得模糊。
HTML
<div class="container">
<div class="inner">
<div class="image">
</div>
</div>
</div>
CSS
.container {
width: 300px;
height: 250px;
}
.inner {
width: 100%;
height: 100%;
position: relative;
}
.image {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: url(/images/400x300.jpg) no-repeat center center fixed;
background-size: fill;
}
.image:before {
left: 0;
right: 0;
bottom: 0px;
content: "text";
position: absolute;
height: 20%;
width: 100%;
background: url(/images/400x300.jpg) no-repeat center center fixed;
background-size: fill;
-webkit-filter: blur(12px);
filter: blur(12px);
}
代码笔:
http://codepen.io/aaronbalthaser/pen/qNOYdE
Codepen 显示模糊区域。它有点像页脚,但您可以看到边缘没有模糊。有什么想法吗?
谢谢
【问题讨论】:
标签: css css-filters