bootstrap-switch.css 5.9 KB

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