We would like to know how to move down animation.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='/js/lib/dummy.js' None></script>
<style type='text/css'>
html, body {<!--from w w w .j av a 2 s . c om-->
height: 417px;
}
div {
position: absolute;
top: 0;
left: 0;
display: block;
width: 320px;
height: 50px;
margin: 0;
background: #F00;
-webkit-animation-name: moveDown;
-webkit-animation-timing-function: ease-in;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 1s;
}
@-webkit-keyframes moveDown { 0% {top: 0;}
100%{top:367px; }
}
</style>
</head>
<body>
<div></div>
</body>
</html>
The code above is rendered as follows: