How to customize the HTML5 input range type looks using CSS?

后端 未结 10 2293
粉色の甜心
粉色の甜心 2020-11-27 15:24

I want to customize the looks of the range input type in HTML5 to look something like a progress bar. I\'ve tried applying some common CSS attributes using CSS class but it

10条回答
  •  盖世英雄少女心
    2020-11-27 15:55

    jQuery Tools provides a plug-in that creates stylable elements from a range input, and what's more, makes it still work as a slider in older browsers that don't support input[type=range].

    Allows you to style:

    • the handle
    • the slider
    • optional progress fill
    • value output field

    I've used it many times and it's a great tool.

    WARNING: doesn't work on touch devices. I don't have as much experience with it, but you could try the jQuery mobile slider: http://view.jquerymobile.com/1.3.0/docs/widgets/sliders/

    http://jquerytools.github.io/demos/rangeinput/index.html

提交回复
热议问题