JSFiddle - React, Tailwind, and code Playground
by Wagner Souza
HTML
<div id="box">Animate</div>
CSS
#box{
background: #f9f9f9;
padding: 1em;
font: 14px Verdana, sans-serif;
text-align: center;
box-shadow: rgba(0,0,0,.3) 0 0 3px;
border-radius: 3px;
color: gray;
width: 200px;
/* anim */
-webkit-animation: anim 2s infinite;
-moz-animation: anim 2s infinite;
-o-animation: anim 2s infinite;
animation: anim 2s infinite;
}
@keyframes anim{
0%{
width: 200px;
}
50%{
width: 500px;
}
100%{
width: 200px;
}
}