<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
div{
display:flex;
justify-content:space-between;
}
p{
padding:20px;
border:1px solid #000;
}
#four{
animation: myAnimation 5s infinite;
-webkit-animation: myAnimation 5s infinite; /* Safari 4.0 - 8.0 */
}
@keyframes myAnimation {
50% {order: 0;}
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes myAnimation {
50% {order: 0;}
}
</style>
</head>
<body>
<h1>CSS Animatable order</h1>
<div>
<p style="order:1;background:#99ffcc;">1</p>
<p style="order:2;background:#ffccff;">2</p>
<p style="order:3;background:#99e6ff;">3</p>
<p style="order:4;background:#ffbf80;"id="four">4</p>
</div> </body>
</html>