Trigger animation when svg is in the viewport
问题 Trigger animation when svg is in the viewport I have a page with a big header image and an svg animation below the fold. Here's the example: html, body { height: 100%; margin: 0 } .header-image { height: 100%; background-color: #ffcc00 } /*Line animations*/ .line { stroke-dasharray: 150; stroke-dashoffset: 150; animation: dash 2s cubic-bezier(0.23, 1, 0.32, 1);; -webkit-animation: dash 2s cubic-bezier(0.23, 1, 0.32, 1);; -webkit-animation-fill-mode: forwards; } #line01, #line02 { animation