JSFiddle - React, Tailwind, and code Playground

by Léo Durand

HTML

<div class="css-selector">

</div>

CSS

.css-selector {
    width: 48px;
    height:18px;
    background: linear-gradient(270deg, #ffffff, #ff0000);
    background-size: 400% 400%;
    -webkit-animation: AnimationName 4s ease infinite;
    -moz-animation: AnimationName 4s ease infinite;
    animation: AnimationName 4s ease infinite;
}

@-webkit-keyframes AnimationName {
    0%{background-position:0% 100%}
    50%{background-position:100% 50%}
    100%{background-position:0% 100%}
}