Transform implements the clock effect and transform implements the clock.
There is another clock effect. canvas is not required for this implementation. It is drawn by div, ul, and li. It is fun and practical.
Haha ~
Javascript is required to achieve this effect, but js does not have much content, and it is not difficult.
The main idea is the use of transform in css. transform has many changing attributes, while normal clock
In my heart, it is a round thing, so can I rotate this attribute (rotate) to achieve it, its scale
If you use rotation and set the rotation point to the center of the center, can you turn around the center of the circle, and the bottom of the hour is not
If you contact the center of the circle, it is okay to set the bottom of the hour hand to the rotation point.
Code:
<!DOCTYPE html>
The most important thing to use label painting is positioning, because we can place the box in the shape you want, and the internal css style sheet can be obtained by getting elements, in this way, you can
Use innerHTML to add a style for it, and you can add it cyclically. Because there are too many scales, you can add them cyclically. This saves time and effort. The rest is the timer, which is given a 1 second time, every 1
Seconds to execute the callback function, so that it is moving.