I have an image of a curved yellow line which I would like to animate. But I don’t know how for better results. Ideally I would like it to draw itself once to appear once im scrolling into view.
Please help…
To not have to use custom code, you could use a png image with transparency. You would have the yellow line but the rest of the image is transparent. You could then make good use of the native Webflow scroll into view interraction and target the opacity of your imge from 0% to 100%
I already tried this… but it looks weird I have this line similar lines that connect multiple sections. It make more sence to make it as it draws itself. I can export the line as SVG. But how do I connect it to work with webflow: play only once and start the animation once I scroll into view.
It would be great if you could export it as SVG. I have an idea that might be helpful to you (I do hope it is). So first, just export it as a static SVG ( in case you are working in Illustrator go to File → Export → Export as → select SVG → Then from Styling: Inline Style ). Make sure that you have a stroke-path, not just fill.
Then use SVGator to create a self-drawing (path) animation. Yes, for that, you will have to purchase a subscription. I’m using svg animations on a regular basis so I have the annual plan, but in case this is just a one-time project for you, you can choose the monthly plan ($18/mo).
Once it’s done simply export the file from svgator. (it’s a single svg file with clean code)
Then just follow these steps to animate it on scroll: