<分区>
I have this very simple pen of a blurred background image.
HTML
<div> </div>
CSS
div {
background: url(http://s15.postimg.org/4elomwgbv/luxvitae.jpg) no-repeat;
width: 1500px;
height: 1000px;
-webkit-filter: blur(25px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
body{
background-color: green;
}
现在发生的是模糊实际上考虑了周围或位于下方的元素,这是我不喜欢的
它基本上是在不应该有背景的地方显示背景,并将图像模糊到背景中。我想要看到的是:没有绿色重叠到我的 div 容器中。我的 div 应该只包含模糊的图像。
有人有想法吗?