+ 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.

9th Apr 2018, 7:34 AM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar
3 Respuestas
9th Apr 2018, 11:20 AM
Calviղ
Calviղ - avatar
+ 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/
9th Apr 2018, 9:43 AM
Mike Choy
Mike Choy - avatar
+ 2
you have events like onmouseover which you can attach to the paragraph
9th Apr 2018, 8:03 AM
Damyan Petkov
Damyan Petkov - avatar