<! DOCTYPE html>
<meta charset= "Utf-8"/>
<title> Animation </title>
<script src= "Jquery-1.7.2.min.js" type= "Text/javascript" charset= "Utf-8" ></script>
<!--<script src= "modernizr-1.6.min.js" type= "Text/javascript" charset= "Utf-8" ></script>-->
<link rel= "stylesheet" type= "Text/css" href= "Animate.css"/>
<style>
*{padding:0;margin:0;list-style-type:none;}
/* page scrolling load */
. Animation-box{width:100%;clear:both;}
. Animation-box ul{width:100%;float:left;margin-bottom:60px;}
. Animation-box ul Li{width:25%;float:left;}
. animation-box ul Li Img{width:100%;float:left;}
</style>
<body style= "height:1000px;" >
<div class= "Animation-box" >
<ul >
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul >
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul >
<li> </li>
<li></li>
<li></li>
<li></li>
</ul>
<ul>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ul>
<ul>
<li></li >
<li> </li>
<li> </li>
<li>< /li>
</ul>
</div>
</body>
<script>
$ (function () {
var $window = $ (window);
win_height_padded = $window. Height () * 1.1;
Istouch = Modernizr.touch;
if (Istouch) {$ ('. Revealonscroll '). AddClass (' animated ');}
$window. On (' scroll ', revealonscroll);
function Revealonscroll () {
var scrolled = $window. ScrollTop (),
win_height_padded = $window. Height () * 1.1;
Showed ...
$ (". Revealonscroll:not (. Animated)"). each (function () {
var $this = $ (this),
OffsetTop = $this. Offset (). Top;
if (scrolled + win_height_padded > OffsetTop) {
if ($this. Data (' timeout ')) {
Window.settimeout (function () {
$this. addclass (' animated ' + $this. Data (' animation '));
}, parseint ($this. Data (' timeout '), 10));
} else {
$this. addclass (' animated ' + $this. Data (' animation '));
}
}
});
Hidden ...
$ (". revealonscroll.animated"). each (function (index) {
var $this = $ (this),
OffsetTop = $this. Offset (). Top;
if (scrolled + win_height_padded < OffsetTop) {
$ (this). Removeclass (' animated fadeinup flipinx lightspeedin bounceinleft bounceinright ')
}
})
}
})
</script>
Page scrolling--Add animation animation effects