Javascript30 - Day02

80 阅读1分钟

Javascript30 - Day02

Github: RyanChen1997/JavaScript30: 30 Day Vanilla JS Challenge (github.com)

Today, I completed a project called "JS and CSS Clock". Through this project, I gained the following insights:

  1. Modifying an element's style directly within the Chrome Browser console is possible.
  2. The CSS property "transform" can be used to rotate an element.
  3. The CSS property "transition-timing-function" can alter the animation of "transform".

However, I discovered a bug in the clock: when the hand points to the 0 o'clock position, it rapidly moves around.

动画.gif

Snipaste_2023-12-18_23-15-09.png