Is there a way to blur rectangle-shaped div? As you can see on image below, it should be blurred to white color where "X" letters are. Is this possible in CSS?
Asked
Active
Viewed 243 times
2 Answers
2
If your "x" letters not fixed with the background then you will blur the 'x' letters in css. First call your 'x' letters and past this line in your css { filter: blur(10px); }.

Developer Tanbir
- 346
- 2
- 13
1
I might not use filter: blur() on your div element, as it might blur the contents of whatever inside your div element.
Assuming that "X" letters are just a mark where you would want a white blur to occur, I would suggest a box-shadow method.
.blur {
background: purple;
text-align: center;
padding:10px;
height: 100px;
width: 200px;
filter: blur(2px);
}
.boxShadow {
background: purple;
text-align: center;
padding:10px;
height: 100px;
width: 200px;
box-shadow: inset 0 0 8px 10px white;
}
<div class="blur">
<p><font color="white">Blur</font></p>
</div>
<div class="boxShadow">
<p><font color="white"> Box-shadow </font></p>
</div>

Alexander Strakhov
- 383
- 3
- 13