+ 4
How to load animation fade-in on certain part of text ?
I don't want to load animation when page loads, but I want to load it when I come to that part of text or paragraph.
3 ответов
+ 3
Hi Dejan
I dont think you can do this in plain CSS. There are jQuery ways of doing this. But if you want to use vanilla JS then you need to listen to the scroll event and check for your div's visibility.
This tutorial may help and small code is available on github
https://gomakethings.com/how-to-test-if-an-element-is-in-the-viewport-with-vanilla-javascript/
+ 2
you have events like onmouseover which you can attach to the paragraph