bootstrap-switch.css 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. /* ========================================================================
  2. * bootstrap-switch - v3.0.0
  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. .bootstrap-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. .bootstrap-switch.bootstrap-switch-mini {
  73. min-width: 71px;
  74. }
  75. .bootstrap-switch.bootstrap-switch-mini > div > span,
  76. .bootstrap-switch.bootstrap-switch-mini > div > label {
  77. padding-bottom: 4px;
  78. padding-top: 4px;
  79. font-size: 10px;
  80. line-height: 9px;
  81. }
  82. .bootstrap-switch.bootstrap-switch-mini .bootstrap-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. .bootstrap-switch.bootstrap-switch-small {
  92. min-width: 79px;
  93. }
  94. .bootstrap-switch.bootstrap-switch-small > div > span,
  95. .bootstrap-switch.bootstrap-switch-small > div > label {
  96. padding-bottom: 3px;
  97. padding-top: 3px;
  98. font-size: 12px;
  99. line-height: 18px;
  100. }
  101. .bootstrap-switch.bootstrap-switch-large {
  102. min-width: 120px;
  103. }
  104. .bootstrap-switch.bootstrap-switch-large > div > span,
  105. .bootstrap-switch.bootstrap-switch-large > div > label {
  106. padding-bottom: 9px;
  107. padding-top: 9px;
  108. font-size: 16px;
  109. line-height: normal;
  110. }
  111. .bootstrap-switch.bootstrap-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. .bootstrap-switch.bootstrap-switch-on > div {
  118. margin-left: 0%;
  119. }
  120. .bootstrap-switch.bootstrap-switch-on > div > label {
  121. -webkit-border-top-right-radius: 4px;
  122. -moz-border-radius-topright: 4px;
  123. border-top-right-radius: 4px;
  124. -webkit-border-bottom-right-radius: 4px;
  125. -moz-border-radius-bottomright: 4px;
  126. border-bottom-right-radius: 4px;
  127. }
  128. .bootstrap-switch.bootstrap-switch-off > div {
  129. margin-left: -50%;
  130. }
  131. .bootstrap-switch.bootstrap-switch-off > div > label {
  132. -webkit-border-top-left-radius: 4px;
  133. -moz-border-radius-topleft: 4px;
  134. border-top-left-radius: 4px;
  135. -webkit-border-bottom-left-radius: 4px;
  136. -moz-border-radius-bottomleft: 4px;
  137. border-bottom-left-radius: 4px;
  138. }
  139. .bootstrap-switch.bootstrap-switch-disabled,
  140. .bootstrap-switch.bootstrap-switch-readonly {
  141. opacity: 0.5;
  142. filter: alpha(opacity=50);
  143. cursor: default !important;
  144. }
  145. .bootstrap-switch.bootstrap-switch-disabled > div > span,
  146. .bootstrap-switch.bootstrap-switch-readonly > div > span,
  147. .bootstrap-switch.bootstrap-switch-disabled > div > label,
  148. .bootstrap-switch.bootstrap-switch-readonly > div > label {
  149. cursor: default !important;
  150. }
  151. .bootstrap-switch.bootstrap-switch-focused {
  152. border-color: rgba(82, 168, 236, 0.8);
  153. outline: 0;
  154. outline: thin dotted \9;
  155. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  156. -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  157. box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  158. }
  159. .bootstrap-switch > div {
  160. display: inline-block;
  161. width: 150%;
  162. top: 0;
  163. -webkit-border-radius: 4px;
  164. -moz-border-radius: 4px;
  165. border-radius: 4px;
  166. -webkit-transform: translate3d(0, 0, 0);
  167. -moz-transform: translate3d(0, 0, 0);
  168. -o-transform: translate3d(0, 0, 0);
  169. transform: translate3d(0, 0, 0);
  170. }
  171. .bootstrap-switch > div > span,
  172. .bootstrap-switch > div > label {
  173. -webkit-box-sizing: border-box;
  174. -moz-box-sizing: border-box;
  175. box-sizing: border-box;
  176. cursor: pointer;
  177. display: inline-block !important;
  178. height: 100%;
  179. padding-bottom: 4px;
  180. padding-top: 4px;
  181. font-size: 14px;
  182. line-height: 20px;
  183. }
  184. .bootstrap-switch > div > span {
  185. text-align: center;
  186. z-index: 1;
  187. width: 33.333333333%;
  188. }
  189. .bootstrap-switch > div > span.bootstrap-switch-handle-on {
  190. -webkit-border-top-left-radius: 4px;
  191. -moz-border-radius-topleft: 4px;
  192. border-top-left-radius: 4px;
  193. -webkit-border-bottom-left-radius: 4px;
  194. -moz-border-radius-bottomleft: 4px;
  195. border-bottom-left-radius: 4px;
  196. }
  197. .bootstrap-switch > div > span.bootstrap-switch-handle-off {
  198. -webkit-border-top-right-radius: 4px;
  199. -moz-border-radius-topright: 4px;
  200. border-top-right-radius: 4px;
  201. -webkit-border-bottom-right-radius: 4px;
  202. -moz-border-radius-bottomright: 4px;
  203. border-bottom-right-radius: 4px;
  204. }
  205. .bootstrap-switch > div > span.bootstrap-switch-primary {
  206. color: #ffffff;
  207. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  208. background-color: #005fcc;
  209. background-image: -moz-linear-gradient(top, #0044cc, #0088cc);
  210. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#0088cc));
  211. background-image: -webkit-linear-gradient(top, #0044cc, #0088cc);
  212. background-image: -o-linear-gradient(top, #0044cc, #0088cc);
  213. background-image: linear-gradient(to bottom, #0044cc, #0088cc);
  214. background-repeat: repeat-x;
  215. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);
  216. border-color: #0088cc #0088cc #005580;
  217. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  218. *background-color: #0088cc;
  219. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  220. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  221. }
  222. .bootstrap-switch > div > span.bootstrap-switch-primary:hover,
  223. .bootstrap-switch > div > span.bootstrap-switch-primary:focus,
  224. .bootstrap-switch > div > span.bootstrap-switch-primary:active,
  225. .bootstrap-switch > div > span.bootstrap-switch-primary.active,
  226. .bootstrap-switch > div > span.bootstrap-switch-primary.disabled,
  227. .bootstrap-switch > div > span.bootstrap-switch-primary[disabled] {
  228. color: #ffffff;
  229. background-color: #0088cc;
  230. *background-color: #0077b3;
  231. }
  232. .bootstrap-switch > div > span.bootstrap-switch-primary:active,
  233. .bootstrap-switch > div > span.bootstrap-switch-primary.active {
  234. background-color: #006699 \9;
  235. }
  236. .bootstrap-switch > div > span.bootstrap-switch-info {
  237. color: #ffffff;
  238. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  239. background-color: #41a7c5;
  240. background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);
  241. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));
  242. background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);
  243. background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);
  244. background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);
  245. background-repeat: repeat-x;
  246. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);
  247. border-color: #5bc0de #5bc0de #28a1c5;
  248. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  249. *background-color: #5bc0de;
  250. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  251. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  252. }
  253. .bootstrap-switch > div > span.bootstrap-switch-info:hover,
  254. .bootstrap-switch > div > span.bootstrap-switch-info:focus,
  255. .bootstrap-switch > div > span.bootstrap-switch-info:active,
  256. .bootstrap-switch > div > span.bootstrap-switch-info.active,
  257. .bootstrap-switch > div > span.bootstrap-switch-info.disabled,
  258. .bootstrap-switch > div > span.bootstrap-switch-info[disabled] {
  259. color: #ffffff;
  260. background-color: #5bc0de;
  261. *background-color: #46b8da;
  262. }
  263. .bootstrap-switch > div > span.bootstrap-switch-info:active,
  264. .bootstrap-switch > div > span.bootstrap-switch-info.active {
  265. background-color: #31b0d5 \9;
  266. }
  267. .bootstrap-switch > div > span.bootstrap-switch-success {
  268. color: #ffffff;
  269. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  270. background-color: #58b058;
  271. background-image: -moz-linear-gradient(top, #51a351, #62c462);
  272. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));
  273. background-image: -webkit-linear-gradient(top, #51a351, #62c462);
  274. background-image: -o-linear-gradient(top, #51a351, #62c462);
  275. background-image: linear-gradient(to bottom, #51a351, #62c462);
  276. background-repeat: repeat-x;
  277. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);
  278. border-color: #62c462 #62c462 #3b9e3b;
  279. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  280. *background-color: #62c462;
  281. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  282. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  283. }
  284. .bootstrap-switch > div > span.bootstrap-switch-success:hover,
  285. .bootstrap-switch > div > span.bootstrap-switch-success:focus,
  286. .bootstrap-switch > div > span.bootstrap-switch-success:active,
  287. .bootstrap-switch > div > span.bootstrap-switch-success.active,
  288. .bootstrap-switch > div > span.bootstrap-switch-success.disabled,
  289. .bootstrap-switch > div > span.bootstrap-switch-success[disabled] {
  290. color: #ffffff;
  291. background-color: #62c462;
  292. *background-color: #4fbd4f;
  293. }
  294. .bootstrap-switch > div > span.bootstrap-switch-success:active,
  295. .bootstrap-switch > div > span.bootstrap-switch-success.active {
  296. background-color: #42b142 \9;
  297. }
  298. .bootstrap-switch > div > span.bootstrap-switch-warning {
  299. color: #ffffff;
  300. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  301. background-color: #f9a123;
  302. background-image: -moz-linear-gradient(top, #f89406, #fbb450);
  303. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));
  304. background-image: -webkit-linear-gradient(top, #f89406, #fbb450);
  305. background-image: -o-linear-gradient(top, #f89406, #fbb450);
  306. background-image: linear-gradient(to bottom, #f89406, #fbb450);
  307. background-repeat: repeat-x;
  308. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);
  309. border-color: #fbb450 #fbb450 #f89406;
  310. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  311. *background-color: #fbb450;
  312. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  313. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  314. }
  315. .bootstrap-switch > div > span.bootstrap-switch-warning:hover,
  316. .bootstrap-switch > div > span.bootstrap-switch-warning:focus,
  317. .bootstrap-switch > div > span.bootstrap-switch-warning:active,
  318. .bootstrap-switch > div > span.bootstrap-switch-warning.active,
  319. .bootstrap-switch > div > span.bootstrap-switch-warning.disabled,
  320. .bootstrap-switch > div > span.bootstrap-switch-warning[disabled] {
  321. color: #ffffff;
  322. background-color: #fbb450;
  323. *background-color: #faa937;
  324. }
  325. .bootstrap-switch > div > span.bootstrap-switch-warning:active,
  326. .bootstrap-switch > div > span.bootstrap-switch-warning.active {
  327. background-color: #fa9f1e \9;
  328. }
  329. .bootstrap-switch > div > span.bootstrap-switch-danger {
  330. color: #ffffff;
  331. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  332. background-color: #d14641;
  333. background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);
  334. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));
  335. background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);
  336. background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);
  337. background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);
  338. background-repeat: repeat-x;
  339. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);
  340. border-color: #ee5f5b #ee5f5b #e51d18;
  341. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  342. *background-color: #ee5f5b;
  343. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  344. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  345. }
  346. .bootstrap-switch > div > span.bootstrap-switch-danger:hover,
  347. .bootstrap-switch > div > span.bootstrap-switch-danger:focus,
  348. .bootstrap-switch > div > span.bootstrap-switch-danger:active,
  349. .bootstrap-switch > div > span.bootstrap-switch-danger.active,
  350. .bootstrap-switch > div > span.bootstrap-switch-danger.disabled,
  351. .bootstrap-switch > div > span.bootstrap-switch-danger[disabled] {
  352. color: #ffffff;
  353. background-color: #ee5f5b;
  354. *background-color: #ec4844;
  355. }
  356. .bootstrap-switch > div > span.bootstrap-switch-danger:active,
  357. .bootstrap-switch > div > span.bootstrap-switch-danger.active {
  358. background-color: #e9322d \9;
  359. }
  360. .bootstrap-switch > div > span.bootstrap-switch-default {
  361. color: #333333;
  362. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
  363. background-color: #f0f0f0;
  364. background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
  365. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
  366. background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
  367. background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
  368. background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
  369. background-repeat: repeat-x;
  370. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
  371. border-color: #ffffff #ffffff #d9d9d9;
  372. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  373. *background-color: #ffffff;
  374. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  375. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  376. }
  377. .bootstrap-switch > div > span.bootstrap-switch-default:hover,
  378. .bootstrap-switch > div > span.bootstrap-switch-default:focus,
  379. .bootstrap-switch > div > span.bootstrap-switch-default:active,
  380. .bootstrap-switch > div > span.bootstrap-switch-default.active,
  381. .bootstrap-switch > div > span.bootstrap-switch-default.disabled,
  382. .bootstrap-switch > div > span.bootstrap-switch-default[disabled] {
  383. color: #333333;
  384. background-color: #ffffff;
  385. *background-color: #f2f2f2;
  386. }
  387. .bootstrap-switch > div > span.bootstrap-switch-default:active,
  388. .bootstrap-switch > div > span.bootstrap-switch-default.active {
  389. background-color: #e6e6e6 \9;
  390. }
  391. .bootstrap-switch > div > label {
  392. text-align: center;
  393. margin-top: -1px;
  394. margin-bottom: -1px;
  395. z-index: 100;
  396. width: 33.333333333%;
  397. border-left: 1px solid #cccccc;
  398. border-right: 1px solid #cccccc;
  399. color: #333333;
  400. text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  401. background-color: #f5f5f5;
  402. background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
  403. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
  404. background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
  405. background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
  406. background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
  407. background-repeat: repeat-x;
  408. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
  409. border-color: #e6e6e6 #e6e6e6 #bfbfbf;
  410. border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  411. *background-color: #e6e6e6;
  412. /* Darken IE7 buttons by default so they stand out more given they won't have borders */
  413. filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  414. }
  415. .bootstrap-switch > div > label:hover,
  416. .bootstrap-switch > div > label:focus,
  417. .bootstrap-switch > div > label:active,
  418. .bootstrap-switch > div > label.active,
  419. .bootstrap-switch > div > label.disabled,
  420. .bootstrap-switch > div > label[disabled] {
  421. color: #333333;
  422. background-color: #e6e6e6;
  423. *background-color: #d9d9d9;
  424. }
  425. .bootstrap-switch > div > label:active,
  426. .bootstrap-switch > div > label.active {
  427. background-color: #cccccc \9;
  428. }
  429. .bootstrap-switch input[type='radio'],
  430. .bootstrap-switch input[type='checkbox'] {
  431. position: absolute !important;
  432. top: 0;
  433. left: 0;
  434. opacity: 0;
  435. filter: alpha(opacity=0);
  436. z-index: -1;
  437. }