slider.css 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. .slider.slider-horizontal .slider-track-low,
  31. .slider.slider-horizontal .slider-track-high {
  32. height: 100%;
  33. top: 0;
  34. bottom: 0;
  35. }
  36. .slider.slider-horizontal .slider-tick,
  37. .slider.slider-horizontal .slider-handle {
  38. margin-left: -10px;
  39. margin-top: -5px;
  40. }
  41. .slider.slider-horizontal .slider-tick.triangle,
  42. .slider.slider-horizontal .slider-handle.triangle {
  43. border-width: 0 10px 10px 10px;
  44. width: 0;
  45. height: 0;
  46. border-bottom-color: #0480be;
  47. margin-top: 0;
  48. }
  49. .slider.slider-horizontal .slider-tick-label-container {
  50. white-space: nowrap;
  51. margin-top: 20px;
  52. }
  53. .slider.slider-horizontal .slider-tick-label-container .slider-tick-label {
  54. padding-top: 4px;
  55. display: inline-block;
  56. text-align: center;
  57. }
  58. .slider.slider-vertical {
  59. height: 230px;
  60. width: 20px;
  61. margin-right: 20px;
  62. display: inline-block;
  63. }
  64. .slider.slider-vertical:last-of-type {
  65. margin-right: 0;
  66. }
  67. .slider.slider-vertical .slider-track {
  68. width: 10px;
  69. height: 100%;
  70. margin-left: -5px;
  71. left: 50%;
  72. top: 0;
  73. }
  74. .slider.slider-vertical .slider-selection {
  75. width: 100%;
  76. left: 0;
  77. top: 0;
  78. bottom: 0;
  79. }
  80. .slider.slider-vertical .slider-track-low,
  81. .slider.slider-vertical .slider-track-high {
  82. width: 100%;
  83. left: 0;
  84. right: 0;
  85. }
  86. .slider.slider-vertical .slider-tick,
  87. .slider.slider-vertical .slider-handle {
  88. margin-left: -5px;
  89. margin-top: -10px;
  90. }
  91. .slider.slider-vertical .slider-tick.triangle,
  92. .slider.slider-vertical .slider-handle.triangle {
  93. border-width: 10px 0 10px 10px;
  94. width: 1px;
  95. height: 1px;
  96. border-left-color: #0480be;
  97. margin-left: 0;
  98. }
  99. .slider.slider-vertical .slider-tick-label-container {
  100. white-space: nowrap;
  101. }
  102. .slider.slider-vertical .slider-tick-label-container .slider-tick-label {
  103. padding-left: 4px;
  104. }
  105. .slider.slider-disabled .slider-handle {
  106. background-image: -webkit-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);
  107. background-image: -o-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);
  108. background-image: linear-gradient(to bottom, #dfdfdf 0%, #bebebe 100%);
  109. background-repeat: repeat-x;
  110. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdfdfdf', endColorstr='#ffbebebe', GradientType=0);
  111. }
  112. .slider.slider-disabled .slider-track {
  113. background-image: -webkit-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);
  114. background-image: -o-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);
  115. background-image: linear-gradient(to bottom, #e5e5e5 0%, #e9e9e9 100%);
  116. background-repeat: repeat-x;
  117. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe5e5e5', endColorstr='#ffe9e9e9', GradientType=0);
  118. cursor: not-allowed;
  119. }
  120. .slider input {
  121. display: none;
  122. }
  123. .slider .tooltip.top {
  124. margin-top: -36px;
  125. }
  126. .slider .tooltip-inner {
  127. white-space: nowrap;
  128. }
  129. .slider .hide {
  130. display: none;
  131. }
  132. .slider-track {
  133. position: absolute;
  134. cursor: pointer;
  135. background-color: #f7f7f7;
  136. background-image: -moz-linear-gradient(top, #f0f0f0, #f9f9f9);
  137. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f0f0f0), to(#f9f9f9));
  138. background-image: -webkit-linear-gradient(top, #f0f0f0, #f9f9f9);
  139. background-image: -o-linear-gradient(top, #f0f0f0, #f9f9f9);
  140. background-image: linear-gradient(to bottom, #f0f0f0, #f9f9f9);
  141. background-repeat: repeat-x;
  142. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0f0f0', endColorstr='#fff9f9f9', GradientType=0);
  143. -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  144. -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  145. box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  146. -webkit-border-radius: 4px;
  147. -moz-border-radius: 4px;
  148. border-radius: 4px;
  149. }
  150. .slider-selection {
  151. position: absolute;
  152. background-color: #f7f7f7;
  153. background-image: -moz-linear-gradient(top, #f9f9f9, #f5f5f5);
  154. background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f9f9f9), to(#f5f5f5));
  155. background-image: -webkit-linear-gradient(top, #f9f9f9, #f5f5f5);
  156. background-image: -o-linear-gradient(top, #f9f9f9, #f5f5f5);
  157. background-image: linear-gradient(to bottom, #f9f9f9, #f5f5f5);
  158. background-repeat: repeat-x;
  159. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
  160. -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  161. -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  162. box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  163. -webkit-box-sizing: border-box;
  164. -moz-box-sizing: border-box;
  165. box-sizing: border-box;
  166. -webkit-border-radius: 4px;
  167. -moz-border-radius: 4px;
  168. border-radius: 4px;
  169. }
  170. .slider-selection.tick-slider-selection {
  171. background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);
  172. background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);
  173. background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);
  174. background-repeat: repeat-x;
  175. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);
  176. }
  177. .slider-track-low,
  178. .slider-track-high {
  179. position: absolute;
  180. background: transparent;
  181. -webkit-box-sizing: border-box;
  182. -moz-box-sizing: border-box;
  183. box-sizing: border-box;
  184. border-radius: 4px;
  185. }
  186. .slider-handle {
  187. position: absolute;
  188. width: 20px;
  189. height: 20px;
  190. background-color: #444;
  191. -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  192. -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  193. box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
  194. opacity: 1;
  195. border: 0px solid transparent;
  196. }
  197. .slider-handle.round {
  198. -webkit-border-radius: 20px;
  199. -moz-border-radius: 20px;
  200. border-radius: 20px;
  201. }
  202. .slider-handle.triangle {
  203. background: transparent none;
  204. }
  205. .slider-handle.custom {
  206. background: transparent none;
  207. }
  208. .slider-handle.custom::before {
  209. line-height: 20px;
  210. font-size: 20px;
  211. content: '\2605';
  212. color: #726204;
  213. }
  214. .slider-tick {
  215. position: absolute;
  216. width: 20px;
  217. height: 20px;
  218. background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
  219. background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
  220. background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);
  221. background-repeat: repeat-x;
  222. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
  223. -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  224. box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  225. -webkit-box-sizing: border-box;
  226. -moz-box-sizing: border-box;
  227. box-sizing: border-box;
  228. filter: none;
  229. opacity: 0.8;
  230. border: 0px solid transparent;
  231. }
  232. .slider-tick.round {
  233. border-radius: 50%;
  234. }
  235. .slider-tick.triangle {
  236. background: transparent none;
  237. }
  238. .slider-tick.custom {
  239. background: transparent none;
  240. }
  241. .slider-tick.custom::before {
  242. line-height: 20px;
  243. font-size: 20px;
  244. content: '\2605';
  245. color: #726204;
  246. }
  247. .slider-tick.in-selection {
  248. background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);
  249. background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);
  250. background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);
  251. background-repeat: repeat-x;
  252. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);
  253. opacity: 1;
  254. }
  255. .slider-disabled .slider-selection {
  256. opacity: 0.5;
  257. }
  258. #red .slider-selection {
  259. background: #f56954;
  260. }
  261. #blue .slider-selection {
  262. background: #3c8dbc;
  263. }
  264. #green .slider-selection {
  265. background: #00a65a;
  266. }
  267. #yellow .slider-selection {
  268. background: #f39c12;
  269. }
  270. #aqua .slider-selection {
  271. background: #00c0ef;
  272. }
  273. #purple .slider-selection {
  274. background: #932ab6;
  275. }