.hov { color: white; } .hovobe { color: black; } .hov:hover { color: black; } .hovobe:hover { animation: bound .3s ease infinite alternate; color: red; } @keyframes bound { 0% {transform: translateY(25px);} 100% {transform: translateY(-25px);} }