slider.css 8.2 KB

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