Trigger CSS Animations in JavaScript
问题 I don't know how to use JQuery, so I need a method which could trigger an animation using JavaScript only. I need to call/trigger CSS Animation when the user scrolls the page. function start() { document.getElementById('logo').style.animation = "anim 2s 2s forward"; document.getElementById('earthlogo').style.animation = "anim2 2s 2s forward"; } * { margin: 0px; } #logo { position: fixed; top: 200px; height: 200px; width: 1000px; left: 5%; z-index: 4; opacity: 0.8; } #earthlogo { position: