r/csshelp • u/staxedd • Jun 21 '23
Need help with gradient blur
I'm trying to implement a gradient blur effect on a div element that should stretch across the element from bottom to top. However, I can't get it to work acceptably. The effect does not behave evenly, but has a very strange color gradient. What am I doing wrong?
my HTML:
<div class="gradient-blur">
<span class="showMoreButton"
(click)="expandMessage()">
Mehr anzeigen
</span>
</div>
my CSS:
.gradient-blur {
position: relative;
width: 100%;
height: 100%;
backdrop-filter: blur(10px);
opacity: 1;
mask: linear-gradient(transparent, black 75%);
}
What my problem looks like: screen
1
Upvotes
View all comments
Show parent comment
1
u/staxedd Jun 21 '23
Could you provide me a codepen or stackblitz example for that? I don't know if i implemented that correctly at my handside.