diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)

Mar272009

Guide to creat an analogue clock using CSS

Paul Hayes has created an interesting experiment that shows “how to create an analogue clock using just CSS and JavaScript is only used to get the current time”. The magic that rotates the clock’s hands comes via two WebKit specific CSS properties, -webkit-transition and -webkit-transform

#clock img[src*='hour'] {
-webkit-transform: rotate(90deg);
}
 
#clock img[src*='second'] {
-webkit-transition: -webkit-transform 60s linear;
}
 
#clock:target img[src*='second'] {
-webkit-transform: rotate(360deg);
}

Full Article

Source:→ Ajaxian

Share This Story, Choose Your Platform!