提交 | 用户 | 时间
|
58d006
|
1 |
/* ============================================================ |
A |
2 |
* bootstrapSwitch v1.8 by Larentis Mattia @SpiritualGuru |
|
3 |
* http://www.larentis.eu/ |
|
4 |
* |
|
5 |
* Enhanced for radiobuttons by Stein, Peter @BdMdesigN |
|
6 |
* http://www.bdmdesign.org/ |
|
7 |
* |
|
8 |
* Project site: |
|
9 |
* http://www.larentis.eu/switch/ |
|
10 |
* ============================================================ |
|
11 |
* Licensed under the Apache License, Version 2.0 |
|
12 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
13 |
* ============================================================ */ |
|
14 |
.has-switch { |
|
15 |
padding: 0; |
|
16 |
display: inline-block; |
|
17 |
cursor: pointer; |
|
18 |
-webkit-border-radius: 5px; |
|
19 |
-moz-border-radius: 5px; |
|
20 |
border-radius: 5px; |
|
21 |
border: 1px solid; |
|
22 |
border-color: #e3e3e3; |
|
23 |
position: relative; |
|
24 |
text-align: left; |
|
25 |
overflow: hidden; |
|
26 |
line-height: 8px; |
|
27 |
-webkit-user-select: none; |
|
28 |
-moz-user-select: none; |
|
29 |
-ms-user-select: none; |
|
30 |
-o-user-select: none; |
|
31 |
user-select: none; |
|
32 |
vertical-align: middle; |
|
33 |
min-width: 100px; |
|
34 |
} |
|
35 |
.has-switch.switch-mini { |
|
36 |
min-width: 72px; |
|
37 |
} |
|
38 |
.has-switch.switch-mini i.switch-mini-icons { |
|
39 |
height: 1.20em; |
|
40 |
line-height: 9px; |
|
41 |
vertical-align: text-top; |
|
42 |
text-align: center; |
|
43 |
transform: scale(0.6); |
|
44 |
margin-top: -1px; |
|
45 |
margin-bottom: -1px; |
|
46 |
} |
|
47 |
.has-switch.switch-small { |
|
48 |
min-width: 80px; |
|
49 |
} |
|
50 |
.has-switch.switch-large { |
|
51 |
min-width: 120px; |
|
52 |
} |
|
53 |
.has-switch.deactivate { |
|
54 |
opacity: 0.5; |
|
55 |
filter: alpha(opacity=50); |
|
56 |
cursor: default !important; |
|
57 |
} |
|
58 |
.has-switch.deactivate label, |
|
59 |
.has-switch.deactivate span { |
|
60 |
cursor: default !important; |
|
61 |
} |
|
62 |
.has-switch > div { |
|
63 |
display: inline-block; |
|
64 |
width: 150%; |
|
65 |
position: relative; |
|
66 |
top: 0; |
|
67 |
} |
|
68 |
.has-switch > div.switch-animate { |
|
69 |
-webkit-transition: left 0.5s; |
|
70 |
-moz-transition: left 0.5s; |
|
71 |
-o-transition: left 0.5s; |
|
72 |
transition: left 0.5s; |
|
73 |
} |
|
74 |
.has-switch > div.switch-off { |
|
75 |
left: -50%; |
|
76 |
margin-left: 1px !important; /* parent container with float:left issue fix*/ |
|
77 |
} |
|
78 |
.has-switch > div.switch-on { |
|
79 |
left: 0%; |
|
80 |
} |
|
81 |
.has-switch input[type=radio], |
|
82 |
.has-switch input[type=checkbox] { |
|
83 |
display: none; |
|
84 |
} |
|
85 |
.has-switch span, |
|
86 |
.has-switch label { |
|
87 |
-webkit-box-sizing: border-box; |
|
88 |
-moz-box-sizing: border-box; |
|
89 |
box-sizing: border-box; |
|
90 |
cursor: pointer; |
|
91 |
position: relative; |
|
92 |
display: inline-block; |
|
93 |
height: 100%; |
|
94 |
padding-bottom: 4px; |
|
95 |
padding-top: 4px; |
|
96 |
font-size: 14px; |
|
97 |
line-height: 20px; |
|
98 |
} |
|
99 |
.has-switch span.switch-mini, |
|
100 |
.has-switch label.switch-mini { |
|
101 |
padding-bottom: 4px; |
|
102 |
padding-top: 4px; |
|
103 |
font-size: 10px; |
|
104 |
line-height: 9px; |
|
105 |
} |
|
106 |
.has-switch span.switch-small, |
|
107 |
.has-switch label.switch-small { |
|
108 |
padding-bottom: 3px; |
|
109 |
padding-top: 3px; |
|
110 |
font-size: 12px; |
|
111 |
line-height: 18px; |
|
112 |
} |
|
113 |
.has-switch span.switch-large, |
|
114 |
.has-switch label.switch-large { |
|
115 |
padding-bottom: 9px; |
|
116 |
padding-top: 9px; |
|
117 |
font-size: 16px; |
|
118 |
line-height: normal; |
|
119 |
} |
|
120 |
.has-switch label { |
|
121 |
text-align: center; |
|
122 |
margin-top: -1px; |
|
123 |
margin-bottom: -1px; |
|
124 |
z-index: 100; |
|
125 |
width: 34%; |
|
126 |
color: #ffffff; |
|
127 |
} |
|
128 |
.has-switch label:hover, |
|
129 |
.has-switch label:focus, |
|
130 |
.has-switch label:active, |
|
131 |
.has-switch label.active, |
|
132 |
.has-switch label.disabled, |
|
133 |
.has-switch label[disabled] { |
|
134 |
color: #ffffff; |
|
135 |
background-color: #e6e6e6; |
|
136 |
} |
|
137 |
.has-switch label:active, |
|
138 |
.has-switch label.active { |
|
139 |
background-color: #cccccc \9; |
|
140 |
} |
|
141 |
.has-switch label i { |
|
142 |
color: #666; |
|
143 |
line-height: 18px; |
|
144 |
pointer-events: none; |
|
145 |
} |
|
146 |
.has-switch span { |
|
147 |
text-align: center; |
|
148 |
z-index: 1; |
|
149 |
width: 33%; |
|
150 |
} |
|
151 |
.has-switch span.switch-left { |
|
152 |
-webkit-border-top-left-radius: 4px; |
|
153 |
-moz-border-radius-topleft: 4px; |
|
154 |
border-top-left-radius: 4px; |
|
155 |
-webkit-border-bottom-left-radius: 4px; |
|
156 |
-moz-border-radius-bottomleft: 4px; |
|
157 |
border-bottom-left-radius: 4px; |
|
158 |
} |
|
159 |
.has-switch span.switch-right { |
|
160 |
color: #333333; |
|
161 |
background-color: #e0e0e0; |
|
162 |
} |
|
163 |
.has-switch span.switch-right:hover, |
|
164 |
.has-switch span.switch-right:focus, |
|
165 |
.has-switch span.switch-right:active, |
|
166 |
.has-switch span.switch-right.active, |
|
167 |
.has-switch span.switch-right.disabled, |
|
168 |
.has-switch span.switch-right[disabled] { |
|
169 |
color: #333333; |
|
170 |
background-color: #e9e9e9; |
|
171 |
} |
|
172 |
.has-switch span.switch-right:active, |
|
173 |
.has-switch span.switch-right.active { |
|
174 |
background-color: #e6e6e6 \9; |
|
175 |
} |
|
176 |
.has-switch span.switch-primary, |
|
177 |
.has-switch span.switch-left { |
|
178 |
color: #ffffff; |
|
179 |
background-color: #428bca; |
|
180 |
} |
|
181 |
.has-switch span.switch-primary:hover, |
|
182 |
.has-switch span.switch-left:hover, |
|
183 |
.has-switch span.switch-primary:focus, |
|
184 |
.has-switch span.switch-left:focus, |
|
185 |
.has-switch span.switch-primary:active, |
|
186 |
.has-switch span.switch-left:active, |
|
187 |
.has-switch span.switch-primary.active, |
|
188 |
.has-switch span.switch-left.active, |
|
189 |
.has-switch span.switch-primary.disabled, |
|
190 |
.has-switch span.switch-left.disabled, |
|
191 |
.has-switch span.switch-primary[disabled], |
|
192 |
.has-switch span.switch-left[disabled] { |
|
193 |
color: #ffffff; |
|
194 |
background-color: #68AAE3; |
|
195 |
} |
|
196 |
.has-switch span.switch-primary:active, |
|
197 |
.has-switch span.switch-left:active, |
|
198 |
.has-switch span.switch-primary.active, |
|
199 |
.has-switch span.switch-left.active { |
|
200 |
background-color: #4B9ADE \9; |
|
201 |
} |
|
202 |
.has-switch span.switch-info { |
|
203 |
color: #ffffff; |
|
204 |
background-color: #41a7c5; |
|
205 |
} |
|
206 |
.has-switch span.switch-info:hover, |
|
207 |
.has-switch span.switch-info:focus, |
|
208 |
.has-switch span.switch-info:active, |
|
209 |
.has-switch span.switch-info.active, |
|
210 |
.has-switch span.switch-info.disabled, |
|
211 |
.has-switch span.switch-info[disabled] { |
|
212 |
color: #ffffff; |
|
213 |
background-color: #5bc0de; |
|
214 |
} |
|
215 |
.has-switch span.switch-info:active, |
|
216 |
.has-switch span.switch-info.active { |
|
217 |
background-color: #31b0d5 \9; |
|
218 |
} |
|
219 |
.has-switch span.switch-success { |
|
220 |
color: #ffffff; |
|
221 |
background-color: #3cc051; |
|
222 |
} |
|
223 |
.has-switch span.switch-success:hover, |
|
224 |
.has-switch span.switch-success:focus, |
|
225 |
.has-switch span.switch-success:active, |
|
226 |
.has-switch span.switch-success.active, |
|
227 |
.has-switch span.switch-success.disabled, |
|
228 |
.has-switch span.switch-success[disabled] { |
|
229 |
color: #ffffff; |
|
230 |
background-color: #62c462; |
|
231 |
} |
|
232 |
.has-switch span.switch-success:active, |
|
233 |
.has-switch span.switch-success.active { |
|
234 |
background-color: #42b142 \9; |
|
235 |
} |
|
236 |
.has-switch span.switch-warning { |
|
237 |
color: #ffffff; |
|
238 |
background-color: #f9a123; |
|
239 |
border-color: #fbb450; |
|
240 |
} |
|
241 |
.has-switch span.switch-warning:hover, |
|
242 |
.has-switch span.switch-warning:focus, |
|
243 |
.has-switch span.switch-warning:active, |
|
244 |
.has-switch span.switch-warning.active, |
|
245 |
.has-switch span.switch-warning.disabled, |
|
246 |
.has-switch span.switch-warning[disabled] { |
|
247 |
color: #ffffff; |
|
248 |
background-color: #fbb450; |
|
249 |
} |
|
250 |
.has-switch span.switch-warning:active, |
|
251 |
.has-switch span.switch-warning.active { |
|
252 |
background-color: #fa9f1e \9; |
|
253 |
} |
|
254 |
.has-switch span.switch-danger { |
|
255 |
color: #ffffff; |
|
256 |
background-color: #d14641; |
|
257 |
border-color: #ee5f5b #ee5f5b #e51d18; |
|
258 |
} |
|
259 |
.has-switch span.switch-danger:hover, |
|
260 |
.has-switch span.switch-danger:focus, |
|
261 |
.has-switch span.switch-danger:active, |
|
262 |
.has-switch span.switch-danger.active, |
|
263 |
.has-switch span.switch-danger.disabled, |
|
264 |
.has-switch span.switch-danger[disabled] { |
|
265 |
color: #ffffff; |
|
266 |
background-color: #ee5f5b; |
|
267 |
} |
|
268 |
.has-switch span.switch-danger:active, |
|
269 |
.has-switch span.switch-danger.active { |
|
270 |
background-color: #e9322d \9; |
|
271 |
} |
|
272 |
.has-switch span.switch-default { |
|
273 |
color: #333333; |
|
274 |
background-color: #f0f0f0; |
|
275 |
} |
|
276 |
.has-switch span.switch-default:hover, |
|
277 |
.has-switch span.switch-default:focus, |
|
278 |
.has-switch span.switch-default:active, |
|
279 |
.has-switch span.switch-default.active, |
|
280 |
.has-switch span.switch-default.disabled, |
|
281 |
.has-switch span.switch-default[disabled] { |
|
282 |
color: #333333; |
|
283 |
background-color: #ffffff; |
|
284 |
} |
|
285 |
.has-switch span.switch-default:active, |
|
286 |
.has-switch span.switch-default.active { |
|
287 |
background-color: #e6e6e6 \9; |
|
288 |
} |