> Home > Time > Analog Clock

Analog Clock

In a Nutshell: Using only a few lines of CSS and Javascript, this code snippet is used to display an analog-style clock on your website, complete with hands to represent the current hour, minute and second.

 

The current time is:

Use it Yourself: First, copy and paste the following CSS code into the <head> section of your HTML, to control the styling of the clock. You can edit this code to change the color of the text, should you wish.

Use it Yourself: Then, Analog Clock requires that the following is added to the <body> section of your page, where appropriate. The DIV tags should appear wherever you want the clock displayed. The SCRIPT elements can appear anywhere in the BODY.
 
Importantly, change the final line of the SCRIPT section (the "setClock" variable) to the timezone that you wish to display. A full list of IANA timezone formats may be found here.

This Script Created By: Joshua Smith

HOME   |   Newest   |   Most Popular   |   Tutorials   |   Submit a Script   |   Email Us


Copyright © 1999-2024 Curiosity Cave Pty Ltd. All rights by all media reserved. All elements on this site, including page design, contents and graphics (with the obvious exception of the free Javascripts) may not be reproduced, broadcast, rewritten or redistributed in whole or in part without the expressed written permission of Curiosity Cave Pty Ltd.