1 - How to create an event when the animation ends? Animation written in css3
2 - How to Play the animation only when all data loaded in the browser ? You can see
Many Thx. Demo jsFiddle
1 - How to create an event when the animation ends? Animation written in css3
2 - How to Play the animation only when all data loaded in the browser ? You can see
Many Thx. Demo jsFiddle
1 - 你需要添加一个 animationEnd 事件监听器
document.getElementById('animation-03').addEventListener('animationend', function () {
alert('end')
}, false);
确保为所有浏览器供应商添加它。
这是一个分叉版本:http: //jsfiddle.net/Fj2vF/2/
2 - 不要担心这个。正如 W3C 规范所说,您的动画只有在所有内容都加载后才会开始。