有没有办法来调整HTML5的范围控制? [英] Is there a way to style HTML5's range control?

查看:156
本文介绍了有没有办法来调整HTML5的范围控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来调整HTML5的范围控制?是否可以更改滑块滑动的线的颜色?

Is there a way to style HTML5's range control? Is it possible to change the color of the line the slider slides on?

推荐答案

出现在webkit中:

Turns out, there is in webkit:

 input[type="range"]{
   -webkit-appearance:none !important;
 }

 input[type="range"]::-webkit-slider-thumb{
   -webkit-appearance:none !important;  
 }

然后,您可以向每个选择器添加任何属性。背景,渐变等...

You can then add whatever attributes you need to each those selectors. Background, gradient, etc...

希望有帮助!

这篇关于有没有办法来调整HTML5的范围控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆