-
Notifications
You must be signed in to change notification settings - Fork 0
/
前端-第3周第1次-CSS(5)-2022·1·19-2.css
71 lines (60 loc) · 1.36 KB
/
前端-第3周第1次-CSS(5)-2022·1·19-2.css
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
* {
padding: 0;
margin: 0;
border: none;
}
body {
width: 100vw;
height: 100vh;
background-color: black;
display: flex;
justify-content: center;
align-items: center;
}
.content {
position: relative;
width: 250px;
height: 166px;
perspective: 1000px;
}
.photoalbum {
width: 250px;
height: 166px;
position: absolute;
transform-style: preserve-3d;
animation: anim 10s infinite both linear;
}
@keyframes anim {
from {
transform: rotateY(0deg) rotateX(-30deg);
}
to {
transform: rotateY(360deg) rotateX(-30deg);
}
}
.photoalbum img {
width: 250px;
height: 166px;
position: absolute;
top: 0;
left: 0;
transform-style: preserve-3d;
}
.photoalbum img:nth-child(1) {
transform: translateZ(-216.5px) rotateY(180deg);
}
.photoalbum img:nth-child(2) {
transform: translate3d(233.25px, 0, -108.25px) rotateY(120deg);
}
.photoalbum img:nth-child(3) {
transform: translate3d(-233.25px, 0, -108.25px) rotateY(240deg);
}
.photoalbum img:nth-child(4) {
transform: translate3d(233.25px, 0, 108.25px) rotateY(60deg);
}
.photoalbum img:nth-child(5) {
transform: translate3d(-233.25px, 0, 108.25px) rotateY(300deg);
}
.photoalbum img:nth-child(6) {
transform: translateZ(216.5px);
}