Allow me to explain my goal here.
I have text displayed on my website that I would like to enlarge when the user hovers over it and then shrink back down when they move their cursor away.
The issue I'm facing is that after enlarging the text using the CSS :hover
method, I am unable to revert it back to its original size afterwards.
#sname{
margin-top: 100px;
margin-bottom: 100px;
color: rgba(1,1,1,0.7);
}
#sname a{
font-weight: bold;
font-size: 4em;
}
#sname a:hover{
font-size:88px;
transition: all 500ms;
font-size-adjust: 20px;
}
I seem to be at an impasse as I've attempted using not:(:hover)
without success, and I've also experimented with :onmouseleave
.
This website is for a college project, and while most of the work is done (just had to link it to a database), I simply want to enhance its appearance through CSS. While JavaScript could solve this, my understanding of it is limited.
Thank you.