skip to content
Website Builder

CSS3 Animation - Just for fun

1st February 2010

Click to view animation - Firefox and Opera



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 examplesSitegrinderuk white label shopping carts for resellersPSD to HTML

Follow CSS play

Facebook   Twitter



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.

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 and Google Chrome 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.




 

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