动画加载页面效果
1. html页面引入文件 scrollReveal.js
2. 在需要加载动画效果的 div 或者其他标签中添加 data-scroll-reveal 属性
3. <div data-scroll-reveal="enter left and move 50px over 1.33s">
内容动画效果
</div>
4. 然后在js区域加入以下代码:
```javascript
window.scrollReveal = new scrollReveal({reset: true});
```
5. data-scroll-reveal 属性
- enter
说明: 动画起始方向
值: top | right | bottom | left
- move
说明: 动画执行距离
值: 数字,以 px 为单位
- over
说明: 动画持续时间
值: 数字,以秒为单位
- after/wait
说明: 动画延迟时间
值: 数字,以秒为单位
原文:https://www.cnblogs.com/chenlulu1122/p/11888951.html