I have a section
, which takes up the whole area of the browser window, and with a background image filling its entire area. Within this section
I have a div
centralized and with another background image.
I'd like to apply a blur
effect to section
to blur the background image, but I'd like the div
within the section
to be unaffected by the effect. The problem is that by applying blur
to section
, the div
within it is also affected. How could I apply blur
to section without affecting div
?
Code:
body{
margin: 0;
padding: 0;
}
section{
position: relative;
display: flex;
justify-content: center;
align-items: center;
background: url(https://images2.alphacoders.com/728/728536.jpg);
background-attachment: fixed;
height: 100vh;
filter: blur(5px);
}
#meio{
filter: blur(0);
background-image: url(https://wallpaperstudio10.com/static/wpdb/wallpapers/1920x1080/195173.jpg);
background-size: cover;
width: 600px;
height: 600px;
border-style: solid;
border-color: blue;
border-width: 20px;
box-shadow: 10px 5px 5px red;
}
<section>
<div id="meio"></div>
</section>