1、地址引入
<link href="css/animate.min.css" rel="stylesheet" type="text/css">
<script src="js/wow.min.js" type="text/javascript"></script>
2、HTML部分
<div class="animated bounceInRight wow" data-wow-delay="0.4s" style="visibility: visible;animation-delay: 0.4s"></div>
注:bounceInRight为animate.css中的动画方式,具体可见官方API给出的示例:https://daneden.github.io/animate.css
3、wow.js初始化代码
<script type="text/javascript"> new WOW().init(); </script>
注:以下是一些自定义配置:
var wow = new WOW({ boxClass: ‘wow‘, animateClass: ‘animated‘, offset: 0, mobile: true, live: true }); wow.init();