javascript 创建垂直滑块 HTML 元素
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8696731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Creating a vertical slider HTML element
提问by sazr
I am trying to create my own HTML element that looks like this:
我正在尝试创建自己的 HTML 元素,如下所示:
The look I want to create: My attempt:
我想创造的外观:我的尝试:
The widget is only for a iPad version of the website & I cannot unfortunately use JQuery.
该小部件仅适用于网站的 iPad 版本,不幸的是我无法使用 JQuery。
My problem:I am trying to add a slider/arrow to the widget but I dont know how? Is there a webkit appearance that has an arrow slider on it? Is it possible to have a slider arrow on the widget?
我的问题:我正在尝试向小部件添加滑块/箭头,但我不知道如何?是否有带有箭头滑块的 webkit 外观?小部件上是否可以有一个滑块箭头?
My code:
我的代码:
<div style="background-color: rgb(191, 326, 383); width: 200px;">
<ul style="list-style: none; -webkit-appearance: slider-vertical; width: 200px; height: 300px; margin: 0;">
<li>jddsjh -</li>
<li>jddsjh -</li>
<li>jddsjh -</li>
<li>jddsjh -</li>
</ul>
</div>
回答by henryaaron
input[type="range"] {
position:absolute;
-webkit-transform: rotate(90deg);
top:100px;
}
<input type="range">