bootstrap-switch.css 15 KB

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