云儿 first blog 小程序

小正方体

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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.box{
width: 200px;
height: 200px;
position: relative;
margin: 50px auto;
transition: all 1s;
transform-style: preserve-3d;
}
.box>div{
width: 100%;
height: 100%;
position: absolute;
/*opacity:.5;*/
}
.box>div:nth-child(1){
background: pink url("../picture/1.jpg") no-repeat;
background-size: 100% 100%;
transform: rotateX(-91deg) translateZ(100px);
}
.box>div:nth-child(2){
background:blue url("../picture/2.jpg") no-repeat;
background-size: 100% 100%;
transform: rotateX(91deg) translateZ(100px);
}
.box>div:nth-child(3){
background:purple url("../picture/3.jpg") no-repeat;
background-size: 100% 100%;
transform: rotateY(-91deg) translateZ(100px);
}
.box>div:nth-child(4){
background:green url("../picture/4.png") no-repeat;
background-size: 100% 100%;
transform: rotateY(91deg) translateZ(100px);
}
.box>div:nth-child(5){
background: yellow url("../picture/5.jpeg") no-repeat;
background-size: 100% 100%;
transform: translateZ(100px);
}
.box>div:nth-child(6){
background: fuchsia url("../picture/6.jpg") no-repeat;
background-size: 100% 100%;
transform: rotateX(180deg) translateZ(100px);
}
.box:hover{
transform: rotateX(360deg) rotateY(360deg);
}
</style>
</head>
<body>
<div class="box">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>