HTML
CSS
JavaScript
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IT书包</title>
</head>
<body>

<div class="demo_box one">动画执行1次</div>
<div class="demo_box infinite">动画执行无数次</div>
<div class="demo_box some">这个不知道</div>

</body>
</html>
CSS
.demo_box {
    border: 1px solid #3DA5DC;
    background: #a4dcf9;
    height: 100px;
    width: 200px;
    text-align: center;
    color: #fff;
}
.demo_box{
    -webkit-animation:f1 2s 0.5s forwards linear;
    -moz-animation:f1 2s 0.5s forwards linear;
    position:relative;
    left:10px;
    width:100px;
    height:100px;
    margin:10px 0;
    overflow:hidden;
}
.one{ 
    -webkit-animation-iteration-count:1;
    -moz-animation-iteration-count:1;
}
.infinite{
    -webkit-animation-iteration-count:infinite;
    -moz-animation-iteration-count:infinite;
}
.some{
    -webkit-animation-iteration-count:2,1;
    -moz-animation-iteration-count:2,1;
}

@-webkit-keyframes f1{
    0%{left:10px;}
    100%{left:500px;}
}
@-moz-keyframes f1{
    0%{left:10px;}
    100%{left:500px;}
}
JavaScript