Maskingtape

Screening the windowframe of reality from the clumsy brushwork of Dan Eastwell.

Nov 01
Permalink

Q: about CSS animations

http://leaverou.me/2011/10/animatable-a-css-transitions-gallery/#comment-352730642 #CSS #animations

How would you couple CSS animations to events? The only ones available in CSS seem to be psuedo-events such as :hover, :active, :focus.

Would you add a class that triggered a CSS animation with e.g. one iteration? You would probably then want to remove the class in order to trigger the animation again if the event was fired.

It seems confusing as you almost certainly want animations to be event based, or the animations have limited triggering options (page load, :hover, :active, :focus)