-
Notifications
You must be signed in to change notification settings - Fork 0
/
xiong.html
98 lines (80 loc) · 1.88 KB
/
xiong.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
* {
margin: 0;
padding: 0;
border: none;
}
body {
background: #999;
border: none;
}
/* 山*/
.slideshow {
width: 100%;
position: absolute;
height: 336px;
bottom: 0;
overflow: hidden;
}
.images {
background: url("images/bg1.png");
position: absolute;
left: 0;
top: 0;
height: 336px;
width: 500%;
animation: slideshow 60s linear infinite;
-webkit-animation: slideshow 120s linear infinite;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
@keyframes slideshow {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-66%);
}
}
/*熊*/
.bear {
position: absolute;
width: 200px;
height: 100px;
bottom: 30px;
background: url("images/bear.png") no-repeat;
/*添加多个动画*/
animation: bearRun 1s steps(8) infinite, move 3s forwards;
}
@keyframes bearRun {
0% {
background-position: 0 0;
}
100% {
background-position: -1600px 0;
}
}
@keyframes move {
0% {
left: 0;
}
100% {
left: 50%;
transform: translateX(-50%);
}
}
</style>
</head>
<body>
<div class="slideshow">
<div class="images">
</div>
</div>
<div class="bear"></div>
</body>
</html>