Run CSS3 animation only once (at page loading)
After hours of googling: No, it's not possible without JavaScript. The animation-iteration-count: 1;
is internally saved in the animation
shothand attribute, which gets resetted and overwritten on :hover
. When we blur the <a>
and release the :hover
the old class reapplies and therefore again resets the animation
attribute.
There sadly is no way to save a certain attribute states across element states.
You'll have to use JavaScript.
If I understand correctly that you want to play the animation on A
only once you have to add
animation-iteration-count: 1
to the style for the a
.