bootstrap-switch.css 6.8 KB

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