-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzeroSlider.css
More file actions
119 lines (108 loc) · 2.94 KB
/
zeroSlider.css
File metadata and controls
119 lines (108 loc) · 2.94 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*░░░▒▒▒▓▓▓███ COMMON STAGE STYLING ███████████████████████████████████████████████████▓▓▓▒▒▒░░░*/
.stage {
display: block;
position: relative;
width: 100%;
margin: 25px auto;
padding-bottom: 33%;
border: none;
overflow: hidden;
box-shadow: 0 0 10px rgba(47, 21, 0, 1);
}
.slide {
display: block;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-size: cover;
background-position: center;
opacity: 0;
z-index: 1;
}
.slide span {
display: block;
font-size: calc(.9vw + .9vh + .45vmin);
position: absolute;
bottom: 10%;
left: 4%;
background-color: rgba(0,0,0,.4);
padding: calc(.75vw + .75vh + .375vmin) calc(1.1vw + 1.1vh + .55vmin);
color: #ccc;
text-shadow: 1px 1px 1px rgba(0,0,0,.1);
border-radius: 4px;
font-weight: 300;
}
.next,
.prev {
transition: 150ms linear all;
position: absolute;
top: 50%;
margin-top: -10px;
border-width: calc(.25vw + .25vh + .125vmin) calc(.25vw + .25vh + .125vmin) 0 0;
border-style: solid;
border-color: #fff;
width: calc(.75vw + .75vh + .375vmin);
height: calc(.75vw + .75vh + .375vmin);
cursor: pointer;
opacity: .5;
filter: drop-shadow(0 0 5px rgba(0,0,0,.1));
}
.next {
right: 25px; z-index: 10;
transform: rotate(45deg);
}
.prev {
left: 25px; z-index: 10;
transform: rotate(-135deg);
}
.next:hover,
.next:active,
.prev:hover,
.prev:active {
opacity: 1;
filter: drop-shadow(0 0 5px rgba(0,0,0,.5));
}
/*░░░▒▒▒▓▓▓███ TRANSITION-BASED STAGE SLIDES ██████████████████████████████████████████▓▓▓▒▒▒░░░*/
/* Normal slide in vanilla/inactive state */
.stage .slide {
transition-property: opacity, transform, z-index;
transition-duration: 0ms;
transition-function: linear;
transition-delay: 5000ms, 5000ms, 0ms;
transform: scale(2) rotate(10deg);
}
/* Active slide */
.stage .slide.on {
transition-property: opacity, transform, z-index;
transition-duration: 5000ms, 5000ms, 0ms;
transition-function: linear;
transition-delay: 0ms;
transform: scale(1);
opacity: 1;
z-index: 10;
}
/* .slide activated by clicking next/prev navigation button.
* May have, for instance, faster transition time, or a completely differen effect */
.stage .slide.on.toggled {
transition-property: opacity, transform, z-index;
transition-duration: 1000ms, 1000ms, 0ms;
transition-function: linear;
transition-delay: 0ms;
transform: scale(1);
opacity: 1;
z-index: 10;
}
/* .slide deactivated by clicking next/prev navigation button. */
.stage .slide.toggled {
transition-property: opacity, transform, z-index;
transition-duration: 1000ms, 1000ms, 0ms;
transition-function: linear;
transition-delay: 0ms;
transform: scale(2) rotate(10deg);
opacity: 0.0001;
z-index: 1;
}