back to all posts

Analog Clock using HTML, CSS & Javascript

by Jitendra Kumar / August 14th, 2021

#javascript #css #webdev

Hello Everybody.in this post we are going to build javascript Clock CSS Neumorphism Working Analog Clock UI Design.

first create one folder inside your compute drive.we can give any name for folder.i given javascript clock.

Analog ClockAnalog Clock

right click on folder and click on open with VsCode. so our project is opened in VsCode editor.

Analog ClockAnalog Clock

Next we create one file inside our project index.html so that first click on plus icon and give file name as index.html Analog ClockAnalog Clock

using !+tab button we can get default html code structure in our html file.

Analog ClockAnalog Clock

Next we link our css file using link tag in index.html file.

Analog ClockAnalog Clock

Next we write three div in index.htm that is used to hours minute and second.

Analog ClockAnalog Clock

Next we will write css code for body and clock class. Analog ClockAnalog Clock

Next write click on index.html file and click on open with live server.

Analog ClockAnalog Clock

our index.html file will open in browser whatever we have by default.

Analog ClockAnalog Clock

Now we will use hover on our clock

Analog ClockAnalog Clock

Next we set position for hour minute and seconds

Analog ClockAnalog Clock

Now we will build hour minute and sec porting using css. Analog ClockAnalog Clock

Next go to browser and check our hour minute and second has designed.

Analog ClockAnalog Clock

Next we write javascript code inside html file using <script> tag. inside that we are getting using Date() class hour minute and second. Analog ClockAnalog Clock

Now our clock has completed. Analog ClockAnalog Clock

Note:you can download source code from this repostiory.

Jitendra Kumar