To achieve a layered effect, consider stacking multiple elements on top of each other. Start with the tallest and least blurred layer to minimize the visibility of the blur against the original image. Subsequent layers can be progressively shorter and more blurred, creating a cascading blur effect. The layers can then be seamlessly blended together using a mask
.
Feel free to customize the parameters based on your preferences:
.img {
background: url(https://4kwallpapers.com/images/walls/thumbs_2t/13551.jpg);
background-size: cover;
background-position: center;
width: 500px;
height: 300px;
position: relative;
}
.img .shadow {
content: "";
height: calc(150px * var(--n) / 4);
bottom: 0;
width: 100%;
position: absolute;
pointer-events: none;
left: 0;
background: linear-gradient( 360deg, rgb(0 0 0 / 75%) 0%, rgba(255, 255, 255, 0) 150px);
-webkit-mask: linear-gradient(0deg, #000, #0000);
mask: linear-gradient(0deg, #000, #0000);
backdrop-filter: blur(calc(10px / var(--n)));
}
.shadow:nth-child(1) {
--n: 4;
}
.shadow:nth-child(2) {
--n: 3;
}
.shadow:nth-child(3) {
--n: 2;
}
.shadow:nth-child(4) {
--n: 1;
}
<div class="img">
<div class="shadow"></div>
<div class="shadow"></div>
<div class="shadow"></div>
<div class="shadow"></div>
<div class="shadow"></div>
</div>