Крутится скачками
<style>
.cell { position:absolute;
display:block;
width:100px;
text-align: center;
font-family:Arial;
-webkit-transition: 0.5s ease;
-moz-transition: 0.5s ease;
-o-transition: 0.5s ease;
transition: 0.5s ease;
}
</style>
<div class="cont">
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
<div class="cell"></div>
</div>
<script>
var tim = 21,
cell = document.querySelectorAll(".cell");
function showTime() {
var currInt = Math.floor(tim);
var currChr = currInt.toString();
currChr = currChr.length == 2? currChr: "0" + currChr;
var result = currChr + ":" + (currInt != tim?"30":"00");
tim = tim + 0.5;
if(tim == 24) tim = 0;
return result;
}
for (var i = 0; i < 9; i++) {
var sinus = Math.sin(i * Math.PI / 8),
cosin = 1 - Math.cos(i * Math.PI / 8);
cell[i].style.top = (cosin * 100 - 10 * sinus) + "px";
cell[i].style.opacity = sinus;
cell[i].innerText = showTime();
cell[i].style.fontSize = 20 * sinus + "px";
};
function timLoop () {
setTimeout(function () {
var change = document.querySelector(".cell");
change.innerText = showTime();
document.querySelector(".cont").appendChild(change);
cell = document.querySelectorAll(".cell");
for (var i = 0; i < 9; i++) {
var sinus = Math.sin(i * Math.PI / 8),
cosin = 1 - Math.cos(i * Math.PI / 8);
cell[i].style.top = (cosin * 100 - 10 * sinus) + "px";
cell[i].style.opacity = sinus;
cell[i].style.fontSize = 20 * sinus + "px";
};
timLoop();
}, 1000)
}
timLoop();
</script>