快速提问 - 如何为输入类型"范围"制作滑块。出现在滑块上? 这是我到目前为止所做的,但似乎没有效果
滑块的ID是'进度条'。
input[type="range"]{
-webkit-appearance: none;
-moz-apperance: none;
border-radius: 26px;
height: 3px;
width: 170px;
background-color: rgb(74,123,197);
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
background-color: #fff;
width: 15px;
height: 15px;
border-radius: 50%;
visibility: visible;
}
#progressbar:hover input[type="range"]::-webkit-slider-thumb {
visibility: visible;
}
提前非常感谢!!
答案 0 :(得分:1)
这样的东西?
HTML:
<div id="progressbar">
<input type="range" min="10" max="100">
</div>
CSS:
input[type="range"] {
-webkit-appearance: none;
-moz-appearance: none;
border-radius: 26px;
height: 3px;
width: 170px;
background-color: rgb(74, 123, 197);
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
-moz-appearance: none;
width: 0;
height: 0;
}
#progressbar:hover input[type="range"]::-webkit-slider-thumb {
width:20px;
height: 20px;
border: 1px solid blue;
border-radius: 50%;
background: #fff;
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.6);
}