I recently created a website for a competition and I am looking to make the text change when a user hovers over a link. While I have managed to achieve the text change, I now want to add a transition to it. I have only used CSS to change the code. Can someone please assist me with this?
Also, I have used the following CSS code:
#link:before
{
position:fixed;
left:52%;
content:"I am feeling lucky";
transition:content 1s;
}
#link:hover:before
{
position:fixed;
text-decoration:none;
left:52%;
color:#666;
content:"Wrong Decision";
}
Unfortunately, the transition effect is not working as expected. I would appreciate any help with correcting the code.