Pseudo Element clipping over text
I have an H1 tag that is currently outlined. I'm trying to add a Pseudo element which fills the color with white (to get rid of outline). The goal is to make a hover fill effect. Any tips? Thanks!
19 Replies
Why not just fill in the color of the h1 on hover? Why a pseudo element ?
I wanted to make the color come in starting from the bottom
Animate a linear gradient on the
h1
.Hmm let me try that
I was literally just thinking that!
I might be doing this wrong
it goes away as soon as animation is done
Try:
I had that originally
Still is a harsh transition
I'm trying to have this kind of effect, but for filling the color
Envato Tuts+
CodePen
CSS Hover Effect: Techniques for Creating a Text Fill Wipe
In todayβs tutorial, weβll learn two different techniques for creating a fill text effect on hover. Weβll even go one step further and give ourselves t...
I tried to do that with the gradient as well
but didn't seem to fix. Still won't transition properly
Did you look at the link?
Yeah, it seems to be doing it entirely different
It's got a background that's twice as tall as the text which is half red & half transparent & is changing its position.
Ohh I was looking at the link I sent
completely missed yours
Interesting thanks for making that codepen