【发布时间】:2017-09-06 23:50:16
【问题描述】:
我正在关注this 教程来自定义垂直输入范围,但我不知道如何使用垂直输入达到相同的结果。
我尝试添加transform: rotate(270deg); 规则,但没有帮助。
body {
padding: 30px;
}
input[type=range] {
/*removes default webkit styles*/
-webkit-appearance: none;
/*fix for FF unable to apply focus style bug */
border: 1px solid white;
/*required for proper track sizing in FF*/
width: 5px;
/* transform: rotate(270deg); */
}
input[type=range]::-webkit-slider-runnable-track {
width: 5px;
height: 300px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: goldenrod;
margin-top: -4px;
}
input[type=range]:focus {
outline: none;
}
input[type=range]:focus::-webkit-slider-runnable-track {
background: #ccc;
}
<input type="range">
【问题讨论】:
-
jsfiddle.net/27jredsp/1 什么不起作用?
-
为什么不用jQuery ui slider api.jqueryui.com/slider/#option-range,它是高度可定制的
-
我更改了
inputwidth和height,这就是它不起作用的原因。
标签: javascript html css