<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
width: 180px;
height: 300px;
background: yellowgreen url(./img1/charector_01.png) no-repeat;
position: relative;
animation: mp 1s linear infinite;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
@keyframes mp {
0% {
background: yellowgreen url(./img1/charector_01.png) no-repeat;
}
16% {
background: yellowgreen url(./img1/charector_02.png) no-repeat;
}
33% {
background: yellowgreen url(./img1/charector_03.png) no-repeat;
}
50% {
background: yellowgreen url(./img1/charector_04.png) no-repeat;
}
66% {
background: yellowgreen url(./img1/charector_05.png) no-repeat;
}
83% {
background: yellowgreen url(./img1/charector_06.png) no-repeat;
}
100% {
background: yellowgreen url(./img1/charector_07.png) no-repeat;
}
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
css3实现动图效果
最新推荐文章于 2022-12-15 14:38:50 发布