JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div id="e">
</div>
</div>
CSS
.wrapper {
-webkit-animation: fadeIn .5s ease-out 0 1;
}
#e {
width: 100px;
height: 100px;
background-color: #000;
}
#e:hover {
-webkit-animation: pulse 100ms ease-in-out 0s infinite alternate; } /* Works fine, pulses on hover */
@-webkit-keyframes fadeIn {
0% { opacity: 0; }
100% { opacity: 0.5;}
}
@-webkit-keyframes pulse {
0% { background-color: #000; }
100% { background-color: #c00; }
}