bootstrap-switch.css 5.4 KB

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