bootstrap-switch.css 6.8 KB

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