<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>行走的悟空</title>
<style>
* {
margin: 0px;
padding: 0px;
}
.box {
width: 88px;
height:75px ;
/* border: solid 1px red; */
margin: 100px auto;
background: url(../01.monkey/1.png);
animation: run 1s steps(8) infinite;
}
/* 动画的声明 */
@keyframes run {
0%{
background-position: left top;
}
100%{
background-position: -704px top;
}
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
图片