简体   繁体   English

输入范围滑块步骤

[英]Input range slider step

Is it possible to create input type="range" to have different step values, so that it increases like 5, 10, 25, 50, 100, and so forth? 是否可以创建input type="range"以具有不同的步长值,以便它增加如5,10,25,50,100等等?

I tried this, but it didn't work. 我尝试了这个,但它没有用。

<input name="number" type="range" min="5" max="100" 
    value="10" step="5,10,25,50" style="width: 40%;">

You can have it like this 你可以这样做

<input type="range" step="25"></input>

Here you will have steps in the range of 0,25,50,75,100. 在这里,您将获得0,25,50,75,100范围内的步骤。 Is that what you need? 这就是你需要的吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM