bootstrap-switch.css 4.3 KB

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