JSFiddle - React, Tailwind, and code Playground

by tjerabek

HTML

<div class="score">
<span class="score-level">5</span>
<span class="score-level-name">level</span>
</div>

CSS

.score{
    padding: 1em;
    margin: 1em; 
    background: #ffd630;   
    display: inline-block;    
    
    -webkit-animation: cycle 500ms ease-in-out;
    -moz-animation: cycle 500ms ease-in-out;
    animation: cycle 500ms ease-in-out;   
}
.score-level{
    display: block;
    text-align: center;
}
.score-level-name{
    display: block;
}

@-webkit-keyframes cycle {
    0%  { margin-top: 1em; } 
    50%  { margin-top: 0; }
    100%  { margin-top: 1em; }
}