-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (83 loc) · 2.28 KB
/
Copy pathindex.html
File metadata and controls
94 lines (83 loc) · 2.28 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>旋转盒子</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background-color: black;
}
.parent {
position: relative;
width: 400px;
height: 400px;
background-color: violet;
margin: auto;
margin-top: 250px;
transform-style: preserve-3d;
animation-name: xuanzhuan;
animation-duration: 10s;
animation-iteration-count: infinite;
}
.parent>div {
position: absolute;
width: 400px;
height: 400px;
border: 1px solid pink;
/* background-image: repeating-linear-gradient(pink 0,pink 1px, transparent 2px,transparent 47px),
repeating-linear-gradient(to right ,pink 0,pink 1px, transparent 2px,transparent 47px); */
}
.div1 {
color: violet;
right: 200px;
transform: rotateY(90deg);
}
.div2 {
color: yellow;
top: -200px;
transform: rotateX(90deg);
}
.div3 {
color: wheat;
right: -200px;
transform: rotateY(90deg);
}
.div4 {
color: springgreen;
bottom: -200px;
transform: rotateX(90deg);
}
.div5 {
color: steelblue;
transform: translateZ(-200px);
}
.div6 {
color: slategray;
transform: translateZ(200px);
}
@keyframes xuanzhuan {
0%{
transform: rotateX(0) rotateY(0);
}
100%{
transform: rotateX(360deg) rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="parent">
<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>
<div class="div4"></div>
<div class="div5"></div>
<div class="div6"></div>
</div>
</body>
</html>