Skip to content

Latest commit

 

History

History
37 lines (20 loc) · 2.6 KB

README.md

File metadata and controls

37 lines (20 loc) · 2.6 KB

Analog Clock

To create a clock with the Rolex logo that shows the current time, I'll be using JavaScript to dynamically retrieve the time from the user's browser. By converting this time into degrees, I can display the appropriate angle on the clock face to accurately represent the current time. This will allow the user to see the time at a glance and enjoy the stylish design of the Rolex logo.

I used HTML to create the basic structure of the clock face, including the circular outline and the markers for the hours and minutes. Then, I used CSS to style the clock, including setting the background color, font styles, and the position of the hour and minute markers.

Finally, I used JavaScript to create the moving hands of the clock. I created functions to calculate the angle of the hands based on the current time, and then used CSS transforms to rotate the hands to the correct positions.

Overall, creating an analog clock using HTML, CSS, and JavaScript was a great way for me to practice my front-end web development skills, including working with the DOM, handling user events, and creating animations. I'm proud of my accomplishment and look forward to using these skills in future projects!

Demo

You can try out the application by visiting this link.

Technologies Used

  • HTML
  • CSS
  • JavaScript

Getting Started

To get started with this project, clone the repository and open the index.html file in your preferred web browser.

New Things I Learned

I had never used querySelector() before, but I was able to see the distinctions between it and getElementById() as well as when to utilise each.

Challenges I faced

I spent a lot of time creating the clock shape using CSS. I had a specific image in mind, and it took some experimentation to translate that image into code. I had to adjust various CSS properties and values to achieve the desired appearance, which was a detailed and time-consuming process.

In addition to the overall clock appearance, I also needed to figure out how to make the clock arrows display the current time accurately. This involved using JavaScript to access and manipulate the current time, as well as calculating the appropriate angles for the clock arrows.

Despite the challenges I faced, I am pleased with how everything turned out. Creating something as intricate as a clock from scratch can be a rewarding experience for designers and developers, and I found the process to be both challenging and satisfying.

Screenshot (27)