6
<a href="#">link</a>
a:hover{
color:blue;
}
With this script I can change the color of the text "link" when the mouse hovers over, but the color is changed instantly. I wanted the color change to be smooth, a little slow. How do I do this?
6
<a href="#">link</a>
a:hover{
color:blue;
}
With this script I can change the color of the text "link" when the mouse hovers over, but the color is changed instantly. I wanted the color change to be smooth, a little slow. How do I do this?
5
Just use transition
:
transition: color .7s;
^ ^--- tempo que vai durar
|
-- propriedade que quer suave
Heed for a detail: in your case (and in most of them) you will apply the transition
in the original item, not affected by :hover
.
If you want images, there’s an example here:
a{
color:red;
transition: color .7s;
}
a:hover{
color:blue;
}
<a href="#">Faça o hover aqui neste link</a>
Browser other questions tagged html css
You are not signed in. Login or sign up in order to post.
Thank you very much!
– Sabrina marçã