我想让背景模糊。但我想模糊不适用于header
,而是对每个人重复模糊images
CSS - 在背景大小级别模糊背景而不是容器
这可能吗?
https://jsfiddle.net/9zphnLn5/
.header {
width: 100%;
padding-top: 40px;
min-height: 135px;
padding-bottom: 0px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.header:before {
content: "";
position: fixed;
left: 0;
right: 0;
z-index: -1;
background-image:url('https://graph.facebook.com/311194819319371/picture?type=small');
width: 500px;
height: 200px;
-webkit-filter: blur(5px);
margin:auto;
}
.header > img {
max-width:300px;
max-height:150px;
}
<div class="header">
<img src="https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/18920203_10155138319170250_8020114684159382803_n.jpg?oh=744adfdc78b6581fa999f0c498889e05&oe=599D7A74" alt="Cover picture "></div>
基础上2个中给出答案,这可以在超过1分的方式进行解释,所以你可以显示预期输出的图纸,并解释_repeated images_意思。 – LGSon
我添加了两张照片。第二个是“中间渲染”。第一个是我想要的“最终渲染”。重要的是我想避免手动增加img。 –
更新了我的答案。请对此进行评论以澄清缺失或需要调整的内容 – LGSon