<div class="bg">
<div class="g-normal">Normal</div>
<div class="g-filter">filter</div>
<div class="g-backdrop-filter">backdrop-filter</div>
</div>
xxxxxxxxxx
.bg {
position: relative;
width: 100vw;
height: 100vh;
background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fyouimg1.c-ctrip.com%2Ftarget%2F100m0d0000006wq082092.jpg&refer=http%3A%2F%2Fyouimg1.c-ctrip.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627269501&t=957b716a2e49a224514c057299950f0c) no-repeat;
background-size: cover;
background-position: center center;
display: flex;
& > div {
width: 300px;
height: 200px;
line-height: 200px;
text-align: center;
font-size: 36px;
background: rgba(255, 255, 255, .7);
background: rgba(0, 0, 0, .1);
margin: auto;
}
.g-filter {
filter: blur(6px);
}
.g-backdrop-filter {
backdrop-filter: blur(6px);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.