bootstrap-switch.css 15 KB

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