bootstrap-switch.css 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /**
  2. * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
  3. *
  4. * @version v3.3.3
  5. * @homepage https://bttstrp.github.io/bootstrap-switch
  6. * @author Mattia Larentis <[email protected]> (http://larentis.eu)
  7. * @license Apache-2.0
  8. */
  9. .bootstrap-switch {
  10. display: inline-block;
  11. direction: ltr;
  12. cursor: pointer;
  13. border-radius: 4px;
  14. border: 1px solid;
  15. border-color: #ccc;
  16. position: relative;
  17. text-align: left;
  18. overflow: hidden;
  19. line-height: 8px;
  20. z-index: 0;
  21. -webkit-user-select: none;
  22. -moz-user-select: none;
  23. -ms-user-select: none;
  24. user-select: none;
  25. vertical-align: middle;
  26. -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  27. -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  28. transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  29. }
  30. .bootstrap-switch .bootstrap-switch-container {
  31. display: inline-block;
  32. top: 0;
  33. border-radius: 4px;
  34. -webkit-transform: translate3d(0, 0, 0);
  35. transform: translate3d(0, 0, 0);
  36. }
  37. .bootstrap-switch .bootstrap-switch-handle-on,
  38. .bootstrap-switch .bootstrap-switch-handle-off,
  39. .bootstrap-switch .bootstrap-switch-label {
  40. -webkit-box-sizing: border-box;
  41. -moz-box-sizing: border-box;
  42. box-sizing: border-box;
  43. cursor: pointer;
  44. display: inline-block !important;
  45. height: 100%;
  46. padding: 6px 12px;
  47. font-size: 14px;
  48. line-height: 20px;
  49. }
  50. .bootstrap-switch .bootstrap-switch-handle-on,
  51. .bootstrap-switch .bootstrap-switch-handle-off {
  52. text-align: center;
  53. z-index: 1;
  54. }
  55. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
  56. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
  57. color: #fff;
  58. background: #337ab7;
  59. }
  60. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
  61. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
  62. color: #fff;
  63. background: #5bc0de;
  64. }
  65. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
  66. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
  67. color: #fff;
  68. background: #5cb85c;
  69. }
  70. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
  71. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
  72. background: #f0ad4e;
  73. color: #fff;
  74. }
  75. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
  76. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
  77. color: #fff;
  78. background: #d9534f;
  79. }
  80. .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
  81. .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
  82. color: #000;
  83. background: #eeeeee;
  84. }
  85. .bootstrap-switch .bootstrap-switch-label {
  86. text-align: center;
  87. margin-top: -1px;
  88. margin-bottom: -1px;
  89. z-index: 100;
  90. color: #333;
  91. background: #fff;
  92. }
  93. .bootstrap-switch .bootstrap-switch-handle-on {
  94. border-bottom-left-radius: 3px;
  95. border-top-left-radius: 3px;
  96. }
  97. .bootstrap-switch .bootstrap-switch-handle-off {
  98. border-bottom-right-radius: 3px;
  99. border-top-right-radius: 3px;
  100. }
  101. .bootstrap-switch input[type='radio'],
  102. .bootstrap-switch input[type='checkbox'] {
  103. position: absolute !important;
  104. top: 0;
  105. left: 0;
  106. margin: 0;
  107. z-index: -1;
  108. opacity: 0;
  109. filter: alpha(opacity=0);
  110. }
  111. .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
  112. .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
  113. .bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
  114. padding: 1px 5px;
  115. font-size: 12px;
  116. line-height: 1.5;
  117. }
  118. .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
  119. .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
  120. .bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
  121. padding: 5px 10px;
  122. font-size: 12px;
  123. line-height: 1.5;
  124. }
  125. .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
  126. .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
  127. .bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
  128. padding: 6px 16px;
  129. font-size: 18px;
  130. line-height: 1.3333333;
  131. }
  132. .bootstrap-switch.bootstrap-switch-disabled,
  133. .bootstrap-switch.bootstrap-switch-readonly,
  134. .bootstrap-switch.bootstrap-switch-indeterminate {
  135. cursor: default !important;
  136. }
  137. .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
  138. .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
  139. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
  140. .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
  141. .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
  142. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
  143. .bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
  144. .bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
  145. .bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
  146. opacity: 0.5;
  147. filter: alpha(opacity=50);
  148. cursor: default !important;
  149. }
  150. .bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
  151. -webkit-transition: margin-left 0.5s;
  152. -o-transition: margin-left 0.5s;
  153. transition: margin-left 0.5s;
  154. }
  155. .bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
  156. border-bottom-left-radius: 0;
  157. border-top-left-radius: 0;
  158. border-bottom-right-radius: 3px;
  159. border-top-right-radius: 3px;
  160. }
  161. .bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
  162. border-bottom-right-radius: 0;
  163. border-top-right-radius: 0;
  164. border-bottom-left-radius: 3px;
  165. border-top-left-radius: 3px;
  166. }
  167. .bootstrap-switch.bootstrap-switch-focused {
  168. border-color: #66afe9;
  169. outline: 0;
  170. -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  171. box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  172. }
  173. .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
  174. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
  175. border-bottom-right-radius: 3px;
  176. border-top-right-radius: 3px;
  177. }
  178. .bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
  179. .bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
  180. border-bottom-left-radius: 3px;
  181. border-top-left-radius: 3px;
  182. }