slider.css 4.3 KB

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