Compruebe el jsFiddle aquí: http://jsfiddle.net/fRzwS/373/.
La animación no se detiene porque la última definición de animation
sobrescribe el valor de la propiedad animation-play-state
. De acuerdo con la W3C specification, animation
:
The 'animation' shorthand property is a comma-separated list of
animation definitions, each of which combines seven of
the animation properties into a single component value.
Y las siete propiedades son:
<single-animation> = <single-animation-name> || <time>
|| <single-animation-timing-function>
|| <time> || <single-animation-iteration-count> || <single-animation-direction>
|| <single-animation-fill-mode> || <single-animation-play-state>
Es similar a las propiedades y background
background-color
.
Así que en el código original:
#tech {
-webkit-animation-play-state: paused;
-webkit-animation: moveSlideshow 10s linear infinite;
}
Propiedad animation-play-state
está dispuesto a ser paused
. Sin embargo, la propiedad tardía animation
OVERWRITES este valor por su valor predeterminado running
. Por lo tanto, puede definir la propiedad animation-play-state
más tarde (http://jsfiddle.net/fRzwS/373/):
#tech {
-webkit-animation: moveSlideshow 10s linear infinite;
-webkit-animation-play-state:paused;
}
O puede simplemente usar (http://jsfiddle.net/fRzwS/374/):
-webkit-animation: moveSlideshow 10s linear infinite paused;
Aquí es otro ejemplo, que funciona tanto en Chrome y Firefox: http://jsfiddle.net/MaY5A/694/
Niza demostración por cierto. +1 Aquí hay un complemento de Mozilla;) http://jsfiddle.net/fRzwS/113/ –
gracias, no puedo creer que me lo perdí, roXon necesitas el prefijo -moz para firefox – Neo
Sé que ... Solo estaba cambiando en la demo (comentario editado arriba) –