How to hide animated elements on load?

后端 未结 3 1955
别跟我提以往
别跟我提以往 2021-02-13 20:29

I\'m using animate.css with waypoints.js in my landing page. I want to animate elements when user scrolls the page. But, the problem is that I need to hide elements before the a

3条回答
  •  一整个雨季
    2021-02-13 20:41

    You can do this with opacities. Add a blank class to the div elements that you will want affect. Once the jquery attaches the animated class with waypoints, you can have bring it back to life with opacity: 1.

    .to-be-animated {
      opacity: 0;
    }
    
    .to-be-animated.animated {
      opacity: 1;
    }
    

提交回复
热议问题