JSFiddle - React, Tailwind, and code Playground
by cssGuy
HTML
<div class="container">
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
</div>
CSS
div {
height: 150px;
width: 150px;
float: left;
}
.container {
margin: 50px;
width: 450px;
perspective:600px;
border: 1px solid;
}
.a {
background-color: blue;
animation: rotateY 2s linear infinite;
}
.b {
background-color: red;
animation: rotateX 2s linear infinite;
}
.c {
background-color: gold;
animation: rotateZ 2s linear infinite;
}
@keyframes rotateY {
from {
transform: rotateY(0deg);
}
to {
transform: rotateY(360deg);
}
}
@keyframes rotateX {
from {
transform: rotateX(0deg);
}
to {
transform: rotateX(360deg);
}
}
@keyframes rotateZ {
from {
transform: rotateZ(0deg);
}
to {
transform: rotateZ(360deg);
}
}