JSFiddle - React, Tailwind, and code Playground
HTML
<a href="http://fake.com">Test</a>
CSS
body {
color:#ffffff;
font-family:"Helvetica";
font-size:12pt;
background-color:#000000;
font-weight:bold;
}
a:link {
-webkit-animation: nohover 1s;
animation: nohover 1s;
color:white;
text-decoration:none;
-webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */
animation-fill-mode: forwards;
}
a:hover {
-webkit-animation: myhover 1s;
animation: myhover 1s;
transition-timing-function: ease-in-out;
font-weight: bold;
-webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */
animation-fill-mode: forwards;
}
@keyframes nohover {
from {
background-color: white;
color: black;
}
to {
background-color: black;
color: white;
}
}
@keyframes myhover {
from {
background-color: black;
color: white;
}
to {
background-color: white;
color: black;
}
}