Greetings to everyone that I'm trying to do now, when you bring the background, it turns purple, and the color of the text becomes white. (initially the background color is absent, and the text is black)
But it does not work!
What am I doing wrong??
a:hover { color: white; -webkit-transition: color 1000ms linear; -moz-transition: color 1000ms linear; -o-transition: color 1000ms linear; -ms-transition: color 1000ms linear; transition: color 1000ms linear; background-color: purple; -webkit-transition: background-color 1000ms linear; -moz-transition: background-color 1000ms linear; -o-transition: background-color 1000ms linear; -ms-transition: background-color 1000ms linear; transition: background-color 1000ms linear; }
So /// EDIT, when everyone says that I add it instead of a: hover ...
The initial state:
text-color:black; background:none;
Induced state:
Smooth transition to:
text-color:white; background:black;
I hope this helps everyone Thanks for your time!
html css transition
user2766367
source share