
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=div, initial-scale=1.0" />
<title>Document</title>
<style>
div[class^="bg"] {
position: absolute;
bottom: 0;
width: 100%;
animation: bg_move 25s linear infinite;
}
.bg1 {
height: 336px;
background: url(https://file.cfanz.cn/uploads/png/2022/04/18/12/85eTQFEEK6.png);
}
.bg2 {
height: 500px;
background: url(https://file.cfanz.cn/uploads/png/2022/04/18/12/6433Z9I006.png);
}
.bear {
position: absolute;
bottom: 15px;
width: 200px;
height: 100px;
background: url(https://file.cfanz.cn/uploads/png/2022/04/18/12/6e13e3253S.png)
no-repeat;
animation: bear 1s steps(8) infinite, move 3s forwards;
}
@keyframes bear {
0% {
}
100% {
background-position: -1600px 0;
}
}
@keyframes move {
0% {
left: 0;
}
100% {
left: 50%;
/* margin-left: -100px; */
transform: translate(-50%);
}
}
@keyframes bg_move {
0% {
background-position: 0 0;
}
100% {
background-position: -3840px 0;
}
}
</style>
</head>
<body>
<div class="bg2">
<div class="bg1">
<div class="bear"></div>
</div>
</div>
</body>
</html>

1832

被折叠的 条评论
为什么被折叠?



