First, HTML. A parent div contains four absolutely positioned divs
Let the cube rotate
.cube--ani { -webkit-animation: rot 4s linear infinite; } @-webkit-keyframes rot { to { -webkit-transform: rotateY(-330deg) rotateX(370deg); } }
An animation rot
is defined here
Rotate from the starting position to Y-axis -330deg X-axis 370deg
OK!