bootstrap-switch.css 6.8 KB

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