我想在范围输入上使用不同颜色的拇指样式。我尝试过寻找解决方案,但我还没有找到合适的解决方案。这是我需要它的样子:拇指前的样式输入范围背景
铬似乎不再支持input[type='range']::-webkit-slider-thumb:before
了,我不知道如何设计它。这是我到目前为止有:
input[type='range'] {
min-width: 100px;
max-width: 200px;
&::-webkit-slider-thumb {
-webkit-appearance: none !important;
background-color: @white;
border: 1px solid @gray-4;
height: 14px;
width: 14px;
&:hover,
&:focus,
&:active {
border-color: @blue;
background-color: @gray-2;
}
}
&::-webkit-slider-runnable-track {
background-color: @gray-2;
border: 1px solid @gray-4;
}
}
[这个其他堆栈溢出问题(http://stackoverflow.com/questions/18389224/how-to-style-html5-range-input-to-have-different-color-before-and-after-slider)有一个很好的答案。 –
[如何设置HTML5范围输入以在滑块之前和之后具有不同的颜色?](http://stackoverflow.com/questions/18389224/how-to-style-html5-range-input-to-have-不同颜色-之前和之后的滑动件) – shaochuancs