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

copyright © stu nicholls - CSS play

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.



Please Support CSS play

Please note that if your donation is for a demo/menu then you will need to email me with the url of the demo/menu after making the donation

For more CSS demonstrations I recommend that you visit the Dynamic Drive CSS Library.


Free, practical CSS menus, layouts, and examples

Soft Geometry Creative Industries

Soft Geometry Creative Industries
is a music-based design company located in Bristol UK.
I create artwork for albums, singles, posters and t-shirts.
My work is influenced by punk and post-punk poster and flyer design,
lo-fi photocopy aesthetics,
Francis Bacon and Mark Rothko.

I can provide a start to finish service with my own art and photography, put together work from images provided by yourself, and collaborate on an idea.
softgeometrycreative{at}gmail.com

Follow CSS play


Facebook   Twitter   Facebook Fan Page