I'm trying to create a simple little frontend project, and I need to make some text discernible from a background image.
How can I make the background behind the text blur? It's just blurring the container, I'd like to only blur behind the actual text.
My current code for this text:
.center h1 {
font-size: 100px;
font-style: italic;
font-family: 'Montserrat', sans-serif;
background: -webkit-linear-gradient(0deg,rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.25));
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
backdrop-filter: blur(10px);
}
/* added by editor for deomnstration purpose */
body {
background-image: url('https://upload.wikimedia.org/wikipedia/commons/5/5b/St_Mary%27s_Church%2C_Castle_Street_1.jpg');
background-size: cover;
}
.center {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -100%);
text-align: center;
width: max-content;
}
<div class="center">
<h1>GLUSH</h1>
<!-- Added by original poster for better running -->
</div>
This is just ending up like this:
Is there any way to do this? I was working with background-clip
earlier...
backdrop-filter: blur(1);
backdrop-filter:
method, and that's the only one i've found on the internet. I've showed how it doesn't work. As I can't find anything else on this, that's the only thing I've currently tried.