bootstrap-switch.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. /* ========================================================================
  2. * bootstrap-switch - v2.0.1
  3. * http://www.bootstrap-switch.org
  4. * ========================================================================
  5. * Copyright 2012-2013 Mattia Larentis
  6. *
  7. * ========================================================================
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. * ========================================================================
  20. */
  21. .clearfix {
  22. *zoom: 1;
  23. }
  24. .clearfix:before,
  25. .clearfix:after {
  26. display: table;
  27. content: "";
  28. line-height: 0;
  29. }
  30. .clearfix:after {
  31. clear: both;
  32. }
  33. .hide-text {
  34. font: 0/0 a;
  35. color: transparent;
  36. text-shadow: none;
  37. background-color: transparent;
  38. border: 0;
  39. }
  40. .input-block-level {
  41. display: block;
  42. width: 100%;
  43. min-height: 30px;
  44. -webkit-box-sizing: border-box;
  45. -moz-box-sizing: border-box;
  46. box-sizing: border-box;
  47. }
  48. .switch {
  49. display: inline-block;
  50. cursor: pointer;
  51. -webkit-border-radius: 5px;
  52. -moz-border-radius: 5px;
  53. border-radius: 5px;
  54. border: 1px solid;
  55. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  56. position: relative;
  57. text-align: left;
  58. overflow: hidden;
  59. line-height: 8px;
  60. -webkit-user-select: none;
  61. -moz-user-select: none;
  62. -ms-user-select: none;
  63. -o-user-select: none;
  64. user-select: none;
  65. vertical-align: middle;
  66. min-width: 100px;
  67. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  68. -moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  69. -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  70. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  71. }
  72. .switch.switch-mini {
  73. min-width: 72px;
  74. }
  75. .switch.switch-mini > div > span,
  76. .switch.switch-mini > div > label {
  77. padding-bottom: 4px;
  78. padding-top: 4px;
  79. font-size: 10px;
  80. line-height: 9px;
  81. }
  82. .switch.switch-mini .switch-mini-icons {
  83. height: 1.20em;
  84. line-height: 9px;
  85. vertical-align: text-top;
  86. text-align: center;
  87. transform: scale(0.6);
  88. margin-top: -1px;
  89. margin-bottom: -1px;
  90. }
  91. .switch.switch-small {
  92. min-width: 80px;
  93. }
  94. .switch.switch-small > div > span,
  95. .switch.switch-small > div > label {
  96. padding-bottom: 3px;
  97. padding-top: 3px;
  98. font-size: 12px;
  99. line-height: 18px;
  100. }
  101. .switch.switch-large {
  102. min-width: 120px;
  103. }
  104. .switch.switch-large > div > span,
  105. .switch.switch-large > div > label {
  106. padding-bottom: 9px;
  107. padding-top: 9px;
  108. font-size: 16px;
  109. line-height: normal;
  110. }
  111. .switch.switch-animate > div {
  112. -webkit-transition: margin-left 0.5s;
  113. -moz-transition: margin-left 0.5s;
  114. -o-transition: margin-left 0.5s;
  115. transition: margin-left 0.5s;
  116. }
  117. .switch.switch-off > div {
  118. margin-left: -50%;
  119. }
  120. .switch.switch-on > div {
  121. margin-left: 0%;
  122. }
  123. .switch.switch-disabled,
  124. .switch.switch-readonly {
  125. opacity: 0.5;
  126. filter: alpha(opacity=50);
  127. cursor: default !important;
  128. }
  129. .switch.switch-disabled > div > span,
  130. .switch.switch-readonly > div > span,
  131. .switch.switch-disabled > div > label,
  132. .switch.switch-readonly > div > label {
  133. cursor: default !important;
  134. }
  135. .switch.switch-focused {
  136. border-color: rgba(82, 168, 236, 0.8);
  137. outline: 0;
  138. outline: thin dotted \9;
  139. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  140. -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  141. box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  142. }
  143. .switch > div {
  144. display: inline-block;
  145. position: relative;
  146. width: 150%;
  147. top: 0;
  148. -webkit-transform: translate3d(0, 0, 0);
  149. -moz-transform: translate3d(0, 0, 0);
  150. -o-transform: translate3d(0, 0, 0);
  151. transform: translate3d(0, 0, 0);
  152. -webkit-border-radius: 4px;
  153. -moz-border-radius: 4px;
  154. border-radius: 4px;
  155. }
  156. .switch > div > span,
  157. .switch > div > label {
  158. -webkit-box-sizing: border-box;
  159. -moz-box-sizing: border-box;
  160. box-sizing: border-box;
  161. cursor: pointer;
  162. display: inline-block !important;
  163. height: 100%;
  164. padding-bottom: 4px;
  165. padding-top: 4px;
  166. font-size: 14px;
  167. line-height: 20px;
  168. }
  169. .switch > div > span {
  170. text-align: center;
  171. z-index: 1;
  172. width: 33.333333333%;
  173. }
  174. .switch > div > span.switch-handle-on {
  175. -webkit-border-top-left-radius: 4px;
  176. -moz-border-radius-topleft: 4px;
  177. border-top-left-radius: 4px;
  178. }
  179. .switch > div > span.switch-handle-off {
  180. color: #333333;
  181. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  182. background-color: #f0f0f0;
  183. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  184. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  185. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  186. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  187. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  188. background-repeat: repeat-x;
  189. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  190. border-color: #ffffff #ffffff #d9d9d9;
  191. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  192. *background-color: #ffffff;
  193. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  194. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  195. }
  196. .switch > div > span.switch-handle-off:hover,
  197. .switch > div > span.switch-handle-off:focus,
  198. .switch > div > span.switch-handle-off:active,
  199. .switch > div > span.switch-handle-off.active,
  200. .switch > div > span.switch-handle-off.disabled,
  201. .switch > div > span.switch-handle-off[disabled] {
  202. color: #333333;
  203. background-color: #ffffff;
  204. *background-color: #f2f2f2;
  205. }
  206. .switch > div > span.switch-handle-off:active,
  207. .switch > div > span.switch-handle-off.active {
  208. background-color: #e6e6e6 \9;
  209. }
  210. .switch > div > span.switch-primary {
  211. color: #ffffff;
  212. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  213. background-color: #005fcc;
  214. background-image: -moz-linear-gradient(top, #0044cc, #0088cc);
  215. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#0088cc));
  216. background-image: -webkit-linear-gradient(top, #0044cc, #0088cc);
  217. background-image: -o-linear-gradient(top, #0044cc, #0088cc);
  218. background-image: linear-gradient(to bottom, #0044cc, #0088cc);
  219. background-repeat: repeat-x;
  220. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);
  221. border-color: #0088cc #0088cc #005580;
  222. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  223. *background-color: #0088cc;
  224. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  225. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  226. }
  227. .switch > div > span.switch-primary:hover,
  228. .switch > div > span.switch-primary:focus,
  229. .switch > div > span.switch-primary:active,
  230. .switch > div > span.switch-primary.active,
  231. .switch > div > span.switch-primary.disabled,
  232. .switch > div > span.switch-primary[disabled] {
  233. color: #ffffff;
  234. background-color: #0088cc;
  235. *background-color: #0077b3;
  236. }
  237. .switch > div > span.switch-primary:active,
  238. .switch > div > span.switch-primary.active {
  239. background-color: #006699 \9;
  240. }
  241. .switch > div > span.switch-info {
  242. color: #ffffff;
  243. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  244. background-color: #41a7c5;
  245. background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);
  246. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));
  247. background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);
  248. background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);
  249. background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);
  250. background-repeat: repeat-x;
  251. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);
  252. border-color: #5bc0de #5bc0de #28a1c5;
  253. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  254. *background-color: #5bc0de;
  255. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  256. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  257. }
  258. .switch > div > span.switch-info:hover,
  259. .switch > div > span.switch-info:focus,
  260. .switch > div > span.switch-info:active,
  261. .switch > div > span.switch-info.active,
  262. .switch > div > span.switch-info.disabled,
  263. .switch > div > span.switch-info[disabled] {
  264. color: #ffffff;
  265. background-color: #5bc0de;
  266. *background-color: #46b8da;
  267. }
  268. .switch > div > span.switch-info:active,
  269. .switch > div > span.switch-info.active {
  270. background-color: #31b0d5 \9;
  271. }
  272. .switch > div > span.switch-success {
  273. color: #ffffff;
  274. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  275. background-color: #58b058;
  276. background-image: -moz-linear-gradient(top, #51a351, #62c462);
  277. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));
  278. background-image: -webkit-linear-gradient(top, #51a351, #62c462);
  279. background-image: -o-linear-gradient(top, #51a351, #62c462);
  280. background-image: linear-gradient(to bottom, #51a351, #62c462);
  281. background-repeat: repeat-x;
  282. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);
  283. border-color: #62c462 #62c462 #3b9e3b;
  284. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  285. *background-color: #62c462;
  286. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  287. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  288. }
  289. .switch > div > span.switch-success:hover,
  290. .switch > div > span.switch-success:focus,
  291. .switch > div > span.switch-success:active,
  292. .switch > div > span.switch-success.active,
  293. .switch > div > span.switch-success.disabled,
  294. .switch > div > span.switch-success[disabled] {
  295. color: #ffffff;
  296. background-color: #62c462;
  297. *background-color: #4fbd4f;
  298. }
  299. .switch > div > span.switch-success:active,
  300. .switch > div > span.switch-success.active {
  301. background-color: #42b142 \9;
  302. }
  303. .switch > div > span.switch-warning {
  304. color: #ffffff;
  305. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  306. background-color: #f9a123;
  307. background-image: -moz-linear-gradient(top, #f89406, #fbb450);
  308. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));
  309. background-image: -webkit-linear-gradient(top, #f89406, #fbb450);
  310. background-image: -o-linear-gradient(top, #f89406, #fbb450);
  311. background-image: linear-gradient(to bottom, #f89406, #fbb450);
  312. background-repeat: repeat-x;
  313. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);
  314. border-color: #fbb450 #fbb450 #f89406;
  315. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  316. *background-color: #fbb450;
  317. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  318. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  319. }
  320. .switch > div > span.switch-warning:hover,
  321. .switch > div > span.switch-warning:focus,
  322. .switch > div > span.switch-warning:active,
  323. .switch > div > span.switch-warning.active,
  324. .switch > div > span.switch-warning.disabled,
  325. .switch > div > span.switch-warning[disabled] {
  326. color: #ffffff;
  327. background-color: #fbb450;
  328. *background-color: #faa937;
  329. }
  330. .switch > div > span.switch-warning:active,
  331. .switch > div > span.switch-warning.active {
  332. background-color: #fa9f1e \9;
  333. }
  334. .switch > div > span.switch-danger {
  335. color: #ffffff;
  336. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  337. background-color: #d14641;
  338. background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);
  339. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));
  340. background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);
  341. background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);
  342. background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);
  343. background-repeat: repeat-x;
  344. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);
  345. border-color: #ee5f5b #ee5f5b #e51d18;
  346. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  347. *background-color: #ee5f5b;
  348. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  349. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  350. }
  351. .switch > div > span.switch-danger:hover,
  352. .switch > div > span.switch-danger:focus,
  353. .switch > div > span.switch-danger:active,
  354. .switch > div > span.switch-danger.active,
  355. .switch > div > span.switch-danger.disabled,
  356. .switch > div > span.switch-danger[disabled] {
  357. color: #ffffff;
  358. background-color: #ee5f5b;
  359. *background-color: #ec4844;
  360. }
  361. .switch > div > span.switch-danger:active,
  362. .switch > div > span.switch-danger.active {
  363. background-color: #e9322d \9;
  364. }
  365. .switch > div > span.switch-default {
  366. color: #333333;
  367. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  368. background-color: #f0f0f0;
  369. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  370. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  371. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  372. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  373. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  374. background-repeat: repeat-x;
  375. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  376. border-color: #ffffff #ffffff #d9d9d9;
  377. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  378. *background-color: #ffffff;
  379. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  380. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  381. }
  382. .switch > div > span.switch-default:hover,
  383. .switch > div > span.switch-default:focus,
  384. .switch > div > span.switch-default:active,
  385. .switch > div > span.switch-default.active,
  386. .switch > div > span.switch-default.disabled,
  387. .switch > div > span.switch-default[disabled] {
  388. color: #333333;
  389. background-color: #ffffff;
  390. *background-color: #f2f2f2;
  391. }
  392. .switch > div > span.switch-default:active,
  393. .switch > div > span.switch-default.active {
  394. background-color: #e6e6e6 \9;
  395. }
  396. .switch > div > label {
  397. text-align: center;
  398. margin-top: -1px;
  399. margin-bottom: -1px;
  400. z-index: 100;
  401. width: 33.333333333%;
  402. border-left: 1px solid #cccccc;
  403. border-right: 1px solid #cccccc;
  404. color: #333333;
  405. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  406. background-color: #f5f5f5;
  407. background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
  408. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
  409. background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
  410. background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
  411. background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
  412. background-repeat: repeat-x;
  413. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
  414. border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  415. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  416. *background-color: #e6e6e6;
  417. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  418. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  419. }
  420. .switch > div > label:hover,
  421. .switch > div > label:focus,
  422. .switch > div > label:active,
  423. .switch > div > label.active,
  424. .switch > div > label.disabled,
  425. .switch > div > label[disabled] {
  426. color: #333333;
  427. background-color: #e6e6e6;
  428. *background-color: #d9d9d9;
  429. }
  430. .switch > div > label:active,
  431. .switch > div > label.active {
  432. background-color: #cccccc \9;
  433. }
  434. .switch input[type=radio],
  435. .switch input[type=checkbox] {
  436. position: absolute !important;
  437. top: 0;
  438. left: 0;
  439. z-index: -1;
  440. }