<!DOCTYPE html>
<html>
<head>
<title>跑马</title>
<style type="text/css" media="screen">
*{
padding:0px;
margin:0px;
}
@keyframes run{
0%{
background-position: 0 0;
}
0%{
background-position: -2400px 0;
}
}
div{
width:200px;
height:100px;
background-image:url(./horse.png);
background-repeat: no-repeat;
background-position: 0 0;
animation:run .5s steps(12,end) infinite forwards;
}
</style>
</head>
<body>
<div class="horse"></div>
</body>
</html>
css3--animation实现跑马效果
最新推荐文章于 2024-04-06 05:33:16 发布