0
Can I build an attractive clock with html,css, javascript.if yes can anyone help me
3 Answers
+ 2
Yes you can, we can take current time with js, with this time we can set clock hands at right position.
Then we need to move hands with some animation.
Here is one tutorial about it, you can find more on internet:
https://www.geeksforgeeks.org/how-to-create-analog-clock-using-html-css-and-javascript/amp/
+ 1
The process of building your own analog clock from scratch.
Step 1: Set up the HTML structure
First, create a basic HTML structure for your clock. You will need a div element to hold the clock's face and hands, as well as divs for each of the clock's hands (hour, minute, and second). You can also add additional elements, such as numbers for the clock's face, if desired.
Step 2: Style the clock with CSS
Next, use CSS to style the elements of the clock. You can set the width, height, position, border, background, and other properties of the clock's face, hands, and numbers. You can also use CSS3 transforms to rotate the hands of the clock as time passes.
Step 3: Add JavaScript for clock functionality
Finally, use JavaScript to create the clock's functionality. You will need to create a function that updates the rotation of the clock's hands based on the current time, and call this function at set intervals (e.g. every second).
https://code.sololearn.com/Wc8Rn6aM8Y33/?ref=app
0
Thanks panics , the website tought alot