-
Notifications
You must be signed in to change notification settings - Fork 0
/
旋转木马.html
79 lines (68 loc) · 1.68 KB
/
旋转木马.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
perspective: 1000px;
}
section {
width: 300px;
height: 200px;
margin: 200px auto
position: relative;
transform-style: preserve-3d;
animation: van-rotate 10s linear infinite;
background: url("images/pig.jpg") no-repeat;
}
section:hover{
animation-play-state: paused;
}
@keyframes van-rotate {
0%{
transform: rotateY(0);
}
100%{
transform: rotateY(360deg);
}
}
section div {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: url("images/dog.jpg") no-repeat;
}
section div:nth-child(1) {
transform: rotateY(0) translateZ(300px);
}
section div:nth-child(2) {
transform: rotateY(60deg) translateZ(300px);
}
section div:nth-child(3) {
transform: rotateY(120deg) translateZ(300px);
}
section div:nth-child(4) {
transform: rotateY(180deg) translateZ(300px);
}
section div:nth-child(5) {
transform: rotateY(240deg) translateZ(300px);
}
section div:nth-child(6) {
transform: rotateY(300deg) translateZ(300px);
}
</style>
</head>
<body>
<section>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</section>
</body>
</html>