No, the blur
is a filter, so there is no way to undo, note that even applying filter: none
will not work, see an example just to understand the problem (This is not the solution, it’s a test):
html, body {
height: 100%;
}
.main {
min-height: 100%;
background: url(https://i.stack.imgur.com/Pk9BV.jpg);
-webkit-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
.main .content {
filter: none;
}
<div class="main">
<div class="content">xxxx</div>
</div>
How to solve
It is possible simulate one background
using position: relative;
+position: absolute;
Would look like this:
Note that in the .main
you can put anything, text, image, etc, and on .main-bg
will be the elements you want to apply the filter, such as blur
for example
html, body {
height: 100%;
}
.main-bg {
position: absolute;
left: 0;
top: 0;
z-index: 100;
width: 100%;
height: 100%;
background: url(https://i.stack.imgur.com/Pk9BV.jpg);
-webkit-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
.main {
position: relative;
z-index: 101; /*posiciona acima do */
}
<div class="main">
foo bar baz foo bar baz foo bar baz<br>
foo bar baz foo bar baz foo bar baz<br>
foo bar baz foo bar baz foo bar baz<br>
foo bar baz foo bar baz foo bar baz<br>
<img src="https://i.stack.imgur.com/Pk9BV.jpg">
</div>
<div class="main-bg"></div>
Can not block, but can simulate. Put image with Blur in the background, and image without Blur in modal.
– Bacco