簡體   English   中英

html-5范圍滑塊最大值和最小值

[英]html-5 range slider max and min value

我正在使用html-5滑塊

      <input type="range" .. />

我想分別在左側和右側滑動minmax 我怎樣才能做到這一點?

嘗試

<input type="range" min="20" max="80" />

DEMO

此外,以下屬性可應用於input type="range"

  • max - 指定允許的最大值
  • min - 指定允許的最小值
  • step - 指定合法的數字間隔
  • value - 指定默認值

如果要在左側和右側顯示minmax ,只需在那里打印:

10 <input type="range" min="10" max="20" /> 20

你也可以使用css,雖然它沒有被廣泛支持。

input[type="range"]:before {
    content: attr(min) " ";
}
input[type="range"]:after {
    content: " " attr(max);
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM