-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
100 lines (85 loc) · 1.8 KB
/
styles.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
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
99
100
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
img {
width: 45vh;
height: 45vh;
max-width: 200px;
max-height: 200px;
object-fit: cover;
user-select: none;
}
.container {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #000;
transform-style: preserve-3d;
overflow-x: hidden;
}
.box {
position: relative;
width: 200px;
height: 200px;
transform-style: preserve-3d;
transform: perspective(1000px) rotateY(0deg);
transition: 1s;
}
.box span {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform-origin: center;
transform-style: preserve-3d;
transform: rotateY(calc(var(--i) * 45deg)) translateZ(300px);
/* backface-visibility: hidden; */
-webkit-box-reflect: below 0px linear-gradient(transparent, transparent, #0004);
}
.btns {
position: absolute;
bottom: 5vh;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 30px;
}
.btns .btn {
position: relative;
width: 50px;
height: 50px;
border: 2px solid #fff;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.btns .btn:active {
background-color: #fff;
}
.btns .btn::before {
content: "";
position: absolute;
width: 10px;
height: 10px;
border-top: 2px solid #fff;
border-right: 2px solid #fff;
transform: rotate(45deg) translate(-2.5px, 2.5px);
}
.btns .btn:active::before {
border-top: 2px solid #000;
border-right: 2px solid #000;
}
.btns .btn.prev::before {
transform: rotate(225deg) translate(-2.5px, 2.5px);
}
@media screen and (max-width: 600px) {
.box span {
backface-visibility: hidden;
}
}