slider.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /*!
  2. * Slider for Bootstrap
  3. *
  4. * Copyright 2012 Stefan Petre
  5. * Licensed under the Apache License v2.0
  6. * http://www.apache.org/licenses/LICENSE-2.0
  7. * http://www.TP-shop.cn
  8. *
  9. */
  10. .slider {
  11. display: block;
  12. vertical-align: middle;
  13. position: relative;
  14. }
  15. .slider.slider-horizontal {
  16. width: 100%;
  17. height: 20px;
  18. margin-bottom: 20px;
  19. }
  20. .slider.slider-horizontal:last-of-type {
  21. margin-bottom: 0;
  22. }
  23. .slider.slider-horizontal .slider-track {
  24. height: 10px;
  25. width: 100%;
  26. margin-top: -5px;
  27. top: 50%;
  28. left: 0;
  29. }
  30. .slider.slider-horizontal .slider-selection {
  31. height: 100%;
  32. top: 0;
  33. bottom: 0;
  34. }
  35. .slider.slider-horizontal .slider-handle {
  36. margin-left: -10px;
  37. margin-top: -5px;
  38. }
  39. .slider.slider-horizontal .slider-handle.triangle {
  40. border-width: 0 10px 10px 10px;
  41. width: 0;
  42. height: 0;
  43. border-bottom-color: #0480be;
  44. margin-top: 0;
  45. }
  46. .slider.slider-vertical {
  47. height: 230px;
  48. width: 20px;
  49. margin-right: 20px;
  50. display: inline-block;
  51. }
  52. .slider.slider-vertical:last-of-type {
  53. margin-right: 0;
  54. }
  55. .slider.slider-vertical .slider-track {
  56. width: 10px;
  57. height: 100%;
  58. margin-left: -5px;
  59. left: 50%;
  60. top: 0;
  61. }
  62. .slider.slider-vertical .slider-selection {
  63. width: 100%;
  64. left: 0;
  65. top: 0;
  66. bottom: 0;
  67. }
  68. .slider.slider-vertical .slider-handle {
  69. margin-left: -5px;
  70. margin-top: -10px;
  71. }
  72. .slider.slider-vertical .slider-handle.triangle {
  73. border-width: 10px 0 10px 10px;
  74. width: 1px;
  75. height: 1px;
  76. border-left-color: #0480be;
  77. margin-left: 0;
  78. }
  79. .slider input {
  80. display: none;
  81. }
  82. .slider .tooltip-inner {
  83. white-space: nowrap;
  84. }
  85. .slider-track {
  86. position: absolute;
  87. cursor: pointer;
  88. background-color: #f7f7f7;
  89. background-image: -moz-linear-gradient(top, #f0f0f0, #f9f9f9);
  90. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f0f0f0), to(#f9f9f9));
  91. background-image: -webkit-linear-gradient(top, #f0f0f0, #f9f9f9);
  92. background-image: -o-linear-gradient(top, #f0f0f0, #f9f9f9);
  93. background-image: linear-gradient(to bottom, #f0f0f0, #f9f9f9);
  94. background-repeat: repeat-x;
  95. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0f0f0', endColorstr='#fff9f9f9', GradientType=0);
  96. -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  97. -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  98. box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  99. -webkit-border-radius: 4px;
  100. -moz-border-radius: 4px;
  101. border-radius: 4px;
  102. }
  103. .slider-selection {
  104. position: absolute;
  105. background-color: #f7f7f7;
  106. background-image: -moz-linear-gradient(top, #f9f9f9, #f5f5f5);
  107. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f9f9f9), to(#f5f5f5));
  108. background-image: -webkit-linear-gradient(top, #f9f9f9, #f5f5f5);
  109. background-image: -o-linear-gradient(top, #f9f9f9, #f5f5f5);
  110. background-image: linear-gradient(to bottom, #f9f9f9, #f5f5f5);
  111. background-repeat: repeat-x;
  112. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
  113. -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  114. -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  115. box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  116. -webkit-box-sizing: border-box;
  117. -moz-box-sizing: border-box;
  118. box-sizing: border-box;
  119. -webkit-border-radius: 4px;
  120. -moz-border-radius: 4px;
  121. border-radius: 4px;
  122. }
  123. .slider-handle {
  124. position: absolute;
  125. width: 20px;
  126. height: 20px;
  127. background-color: #444;
  128. -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  129. -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  130. box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  131. opacity: 1;
  132. border: 0px solid transparent;
  133. }
  134. .slider-handle.round {
  135. -webkit-border-radius: 20px;
  136. -moz-border-radius: 20px;
  137. border-radius: 20px;
  138. }
  139. .slider-handle.triangle {
  140. background: transparent none;
  141. }
  142. .slider-disabled .slider-selection {
  143. opacity: 0.5;
  144. }
  145. #red .slider-selection {
  146. background: #f56954;
  147. }
  148. #blue .slider-selection {
  149. background: #3c8dbc;
  150. }
  151. #green .slider-selection {
  152. background: #00a65a;
  153. }
  154. #yellow .slider-selection {
  155. background: #f39c12;
  156. }
  157. #aqua .slider-selection {
  158. background: #00c0ef;
  159. }
  160. #purple .slider-selection {
  161. background: #932ab6;
  162. }