<div class="row">
<div class="col-lg-3">
<button class="btn">
button
</button>
</div>
.col-lg-3{
background-color:#8CD6EB;
-webkit-filter: blur(3px);
-moz-filter: blur(3px);
-o-filter: blur(3px);
-ms-filter: blur(3px);
filter: blur(3px);
}
If I do not want to blur the button, what do I need to do?
Just create two divisions and adjust their z-indexes and margins such that the division you want to blur lies below the division you want to appear on top.
PS: Don't create division inside a division cause the child inherits the parent's properties.
When using the
blur
oropacity
property, it is not possible to ignore the child element. If you apply either of those properties to parent element, it will automatically apply to child elements too.There is an alternate solution: create two elements inside your parent
div
– onediv
for the background and anotherdiv
for the contents. Setposition:relative
on the parentdiv
and setposition:absolute; top:0px; right:0px; bottom:0px; left:0px;
(or set height/width to 100%) to the child element for the background. Using this method, the contentdiv
will not be affected by properties on the background.Example:
If you see the background masking over the content, then use the
z-index
property to send the background behind the second contentdiv
.