JSFiddle - React, Tailwind, and code Playground

by James Butler

HTML

<body>
    <div id="center">
        <div class="box"></div>
    </div>
</body>

<div>
    note:
    <br/>
    the non-prefixed animation should be at the end, and <br/>
    remove duplicate colons in your keyframes
</div>

CSS

body {
    width:100%;
}
#center .box {
    width:100px;
    height:100px;
    background-color:black;
    margin:0 auto;
    -webkit-animation: myfirst 5s; /* Chrome, Safari, Opera */   
    -moz-animation: myfirst 5s;/*Mozilla*/    
     animation: myfirst 5s;/*Explorer*/    
    -webkit-animation-iteration-count: infinite;/*Végtelen újrajátszás */    
    -moz-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}
@-webkit-keyframes myfirst {
    from {
        background:black;
    }
    to {
        background:yellow;
    }
}
@-moz-keyframes myfirst {
    from {
        background:black;
    }
    to {
        background:yellow;
    }
}
@keyframes myfirst {
    from {
        background:black;
    }
    to {
        background:yellow;
    }
}