-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path3d-carousel.css
99 lines (95 loc) · 1.77 KB
/
3d-carousel.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
:root {
--accent: #ff4000;
--accentDark: darkblue;
--accentHover: #7e2708;
--shadow: 0 2px 2px -1px rgba(0, 0, 0, .19), 0 1px 4px 0 rgba(0, 0, 0, .17), 0 3px 1px -2px rgba(0, 0, 0, .25);
}
html {
overflow-x: hidden; /* Firefox fix for the cube when rotating */
}
.CubeCarousel {
position: relative;
width: 80%;
margin: 0 auto;
}
.CubeScene img {
display: block;
width: 100%;
height: auto;
transform: scale(0.99999999);
box-shadow: var(--shadow);
}
.CubeControls {
margin-top: 20px;
text-align: center;
}
.cubeRadioButton {
display: inline-block;
position: relative;
padding: 20px 6px 8px;
background: none;
border: 0;
color: #ccc;
font-size: 15px;
cursor: pointer;
transition-property: box-shadow;
}
.cubeRadioButton input {
width: 0;
height: 0;
position: absolute;
}
.cubeRadioButton:not(.cubeSelected):hover {
background: var(--accentHover);
}
.cubeRadioButton:not(:last-of-type) {
margin-right: 4px;
}
.cubeRadioButton .title {
display: block;
padding: 2px 3px;
line-height: 1.2;
}
.cubeRadioButton:active:not(.cubeSelected) {
transition: none;
}
.cubeRadioButton.cubeSelected {
cursor: default;
pointer-events: none;
}
.cubeRadioButton .icon,
.cubeRadioButton.cubeSelected .icon {
position: relative;
top: -8px;
left: calc(50% - 10px);
display: block;
width: 20px;
height: 20px;
border: 2px solid var(--accent);
border-radius: 15px;
}
.cubeRadioButton.cubeSelected .icon {
background: var(--accent);
}
.cubeRadioButton input:focus + .icon {
animation: _pulseScale 500ms infinite alternate-reverse ease-in-out;
}
@keyframes _pulseScale {
0% {
transform: scale(0.92);
}
100% {
transform: scale(1.15);
}
}
.Cube {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
}
.cf {
position: absolute;
top: 0;
display: none;
}