-
Notifications
You must be signed in to change notification settings - Fork 14
/
slider.css
executable file
·149 lines (144 loc) · 2.76 KB
/
slider.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/* ==========================================================================
Slider core styles
===========================================================================*/
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.slider-container {
position: relative;
overflow: hidden;
width: 100%;
margin: 0 auto;
background-color: #444;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.slider {
position: relative;
width: 9999px;
}
.slider:before,
.slider:after {
display: table;
content: ' ';
}
.slider:after {
clear: both;
}
.slider__item {
position: relative;
float: left;
margin: 0;
padding: 0;
height: 100%;
}
.slider__item img {
display: block;
max-width: 100%;
min-width: 100%;
height: auto;
}
.slider__item div {
padding: 0;
}
.slider__switch span {
color: #fff;
display: block;
width: 56px;
height: 56px;
}
/* Arrows */
.slider__switch {
position: absolute;
top: 50%;
margin-top: -32px;
padding: 10px 5px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
opacity: 1;
transition: opacity .15s ease;
fill: #fff;
}
.slider__switch--prev {
left: 10px;
}
.slider__switch--next {
right: 10px;
}
.slider__switch:hover {
opacity: 0.5;
}
.slider__switch[disabled] {
visibility: hidden;
opacity: 0;
}
.slider__caption {
position: absolute;
bottom: 30px;
left: 30px;
display: block;
max-width: 500px;
padding: 10px;
color: #fff;
background: rgba(0, 0, 0, .4);
box-shadow: 0 0 20px 10px rgba(0,0,0,.4);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#99000000', endColorstr='#99000000'); /* ie8 */
}
.slider__caption[disabled] {
opacity: 0;
visibility: hidden;
}
.slider-nav {
line-height: 30px;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
margin: 0;
padding: 0;
text-align: center;
z-index: 99999;
filter: alpha(opacity=90); /* ie8 */
}
.slider-nav__control {
display: inline-block;
width: 12px;
height: 12px;
margin: 0 3px;
-webkit-transition: background .5s ease;
-moz-transition: background .5s ease;
-o-transition: background .5s ease;
transition: background .5s ease;
border: 2px solid #fff;
border-radius: 50%;
background: transparent;
}
.slider-nav__control.is-active {
width: 12px;
height: 12px;
background: #fff;
}
.slider.has-touch {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
}
@media (max-width: 580px) {
.slider__switch {
display: none;
}
.slider__caption {
display: none;
}
}