I have this example snippet code for the anchor tag link. How do you hover a background color from bottom to top using transition?
I have found this reference link but this is not what I want to do in my css, it is using pseudo element before
and after
.
before and after pseudo element transition
.container {width:1000px; max-width:100%; margin:0 auto; padding:0; text-align:center;}
a {margin:0 auto;text-decoration:none;width:150px; height:30px; background: red; display:block; border: 1px solid black; color:#fff;border-radius:20px; text-align:center;transform-origin: left top;
transition: all 1s ease;}
a:hover {background: green; color:black; border:1px solid green;}
<div class="container">
<a href="#">Lorem Ipsum Dolor</a>
</div>
Is it using css properties transition
and transform
to do this? Please help, I'm quite new to CSS3.