-
Notifications
You must be signed in to change notification settings - Fork 42
/
perspective.css
94 lines (81 loc) · 2.59 KB
/
perspective.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
/* styles for perspective demo */
.glider-perspective .glider-track {
position: relative;
align-items: center;
}
.glider-perspective .slide-outer {
padding: 0 10px;
}
.slide-outer > span {
display: flex;
height: 100%;
align-items: center;
background: white;
border: 1px solid #cacaca;
color: #8cc9f0;
font-weight: bold;
font-size: 3em;
justify-content: center;
}
@media screen and (prefers-color-scheme: dark) {
.slide-outer > span {
background: #333;
border: 1px solid #4a4a5a;
}
}
.slide-outer:nth-child(2n) > span {
color: #a89cc8;
}
.slide-outer:nth-child(3n) > span {
color: #efa8b0;
}
.glider-perspective .glider-slide {
height: 150px !important;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
transform-style: preserve-3d;
will-change: transform;
transform: perspective(1000px) rotateY(0deg) scale(1) translateZ(0);
transform-origin: 0 0;
transition: transform 600ms cubic-bezier(0.23, 1, 0.32, 1);
}
.glider-perspective .glider-slide.right-3 {
-webkit-transform: perspective(1000px) rotateY(-50deg) scale(1.45)
translateZ(0);
-webkit-transform-origin: 100% 50% 0;
transform: perspective(1000px) rotateY(-50deg) scale(1.45) translateZ(0);
transform-origin: 0% 50% 0;
}
.glider-perspective .glider-slide.left-3 {
-webkit-transform: perspective(1000px) rotateY(50deg) scale(1.45)
translateZ(0);
-webkit-transform-origin: 100% 50% 0;
transform: perspective(1000px) rotateY(50deg) scale(1.45) translateZ(0);
transform-origin: 0% 50% 0;
}
.glider-perspective .glider-slide.left-2 {
-webkit-transform: perspective(1000px) rotateY(50deg) scale(1.25) translateZ(0);
-webkit-transform-origin: 100% 50% 0;
transform: perspective(1000px) rotateY(50deg) scale(1.25) translateZ(0);
transform-origin: 100% 50% 0;
}
.glider-perspective .glider-slide.right-2 {
-webkit-transform: perspective(1000px) rotateY(-50deg) scale(1.25)
translateZ(0);
-webkit-transform-origin: 0 50% 0;
transform: perspective(1000px) rotateY(-50deg) scale(1.25) translateZ(0);
transform-origin: 0 50% 0;
}
.glider-perspective .glider-slide.left-1 {
-webkit-transform: perspective(1000px) rotateY(34deg) scale(1.1) translateZ(0);
-webkit-transform-origin: 100% 50% 0;
transform: perspective(1000px) rotateY(34deg) scale(1.1) translateZ(0);
transform-origin: 100% 50% 0;
}
.glider-perspective .glider-slide.right-1 {
-webkit-transform: perspective(1000px) rotateY(-34deg) scale(1.1)
translateZ(0);
-webkit-transform-origin: 0 50% 0;
transform: perspective(1000px) rotateY(-34deg) scale(1.1) translateZ(0);
transform-origin: 0 50% 0;
}