Two different clocks one is a digital flip clock, and the other a traditional circular analogue clock.
Digital Flip Clock Analogue Clock
You can build different clocks by adding more clocks
<div class="clock" id="hours">
<div class="next-val"></div>
<div class="clock-upper">
<span class="val"></span>
<span class="next-val"></span>
</div>
<div class="clock-lower">
<span class="val"></span>
</div>
</div>
var hour = new Clock("#hours", 'hour', 2);
Clock(element, period_interval, animation_duration);
period_interval can be:
- hour
- minute
- second
Uses CSS variables to determine colour for each clock widget. You can change the colour of the clocks by setting a dark and light colour:
#hours {
--light-color: #e74c3c;
--dark-color: #cf2e1d;
}
Slightly more simple than the flip clock. One method.
<div class="clock-holder">
<div class="clock">
<div class="time"></div>
<div class="time"></div>
<div class="time"></div>
<div class="time"></div>
<div class="dial"></div>
<div class="hand hours"></div>
<div class="hand minutes"></div>
<div class="hand seconds"></div>
</div>
</div>
var clock = new Clock(".clock");
clock.init();