<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
/* body {
perspective: 200px;
} */
.bg1 {
position: absolute;
bottom: 0;
width: 100%;
height: 336px;
transform: translateZ(-600px);
background: url(bg1.png) no-repeat;
}
.bg2 {
position: absolute;
bottom: 50px;
width: 100%;
height: 336px;
background: url(bg2.png) no-repeat;
transform: translateZ(-600px);
z-index: -1;
}
.bear {
position: absolute;
bottom: 50px;
width: 200px;
height: 100px;
background: url(bear.png) no-repeat;
z-index: 2;
animation: bear steps(8) 0.5s infinite, move 1s linear forwards;
}
@keyframes bear {
0% {}
100% {
background-position: -1600px;
}
}
@keyframes move {
0% {
left: 0;
}
100% {
left: 50%;
transform: translateX(-50%);
}
}
</style>
</head>
<body>
<div class="bear"></div>
<div class="bg1"></div>
<div class="bg2"></div>
</body>
</html>
小熊奔跑动态
最新推荐文章于 2025-05-28 17:51:49 发布