skip to content
Advertise here

CSS3 Animation - Just for fun

1st February 2010

Click to view animation - Firefox and Opera - and now (10th March 2011) Safari and Chrome



Hover to view animation - Safari, Google Chrome, IE8, Firefox and Opera

©2010 stu nicholls - cssplay.co.uk


CSS play Support


CSS play Recommend

Free, practical CSS menus, layouts, and examples

Follow CSS play

Facebook  Twitter  Facebook Fan Page



Just CSS | Designs for the future

Like the CSS Zen Garden?
Then why not visit Just CSS and see it you can design for the future.




Information

After looking at another 'Test you skills' quiz on Sitepoint CSS - Test Your CSS Skills Number 32 and some work by 'drjochum' and 'YuriKolovsky', I have come up with this demonstration which makes use of of the CSS3 selector '+' (next sibling) to make 'next' elements move to the top of the pile when either hovering or clicking the 'previous' element.

The first demonstration reqires you to keep clicking the image to see the next frame, and it wraps around to the start when you reach the last frame.

This works in Opera, Firefox and is buggy in IE8. Now working in Safari and Chrome.

The second demonstration just needs you to keep the mouse moving over the image in MOST browsers. But the BIG drawback to this method is that the speed of movement of the mouse governs the speed of animation. This works in Firefox, Opera, Safari and Google Chrome.

It works perfectly in IE8 by just placing the mouse over the image and DO NOT MOVE IT. IE8 appears to continually monitor the mouse hover.

ALSO, because Safari, Chrome and Opera have transition control, the speed of change of the images on hover can be slowed down. So these two browsers have been slowed down to a frame every 0.1 seconds irrespective of the speed of the mouse so you will see a nice smooth animation in these two browsers.

Remember this is only for fun.




Copyright

You may use this method on your personal 'non-profit' web site without seeking my permission. A link back to CSSplay is always appreciated.

Commercial usage is also permitted without seeking approval, but I would ask that a donation is considered to support my work on CSSPlay.

If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.




  • Each week the Creare Group produce video tutorials for SEO and tips and tricks for the web design industry.
  • We offer nothing but the highest quality SEO, Social Media Optimisation And PPC services to businesses in London

 

CSS play Testimonial

"The citroen.co.uk web site uses
CSS play code for the site drop down menus.
This code works seamlessly in IE 6 & 7, and is an excellent solution to the Creative requirements of the site."

Damon Clark - Brandwidth