直到 safari 5.1 和 6.0 才有可能通过 css 隐藏 slider
input[type=range].onoff::-webkit-slider-thumb,
input[type=range].onoff::-moz-slider-thumb,
input[type=range].onoff::slider-thumb {
-webkit-appearance: none !important;
-moz-appearance: none !important;
appearance: none !important;
height:20px; width:20px;
background-color:transparent;
}
还在 chrome、ff 和 opera 中工作过。
现在使用 safari 6.1 和 6.1.1,firefox 25 这个 css 不再隐藏 slider-thumb。 我错过了什么? 有没有更好、更有效的代码我可以用来隐藏拇指?
请不要使用 jquery 解决方案,我使用原生 javascript 插件来添加可触摸的音频轮,在不同的环境中工作。也许以后我也会把它翻译成 jQ。
最佳答案
好的测试..
看起来,逗号分隔的选择器列表和一次性设置它们不再有效。所以有效代码可以是..
input[type=range].onoff::-webkit-slider-thumb {
-webkit-appearance: none;
}
input[type=range].onoff::-moz-slider-thumb {
-moz-appearance: none;
}
input[type=range].onoff::slider-thumb {
appearance: none;
}
但我仍然在 FF 中无法隐藏拇指,怎么办?
关于html - 在 webkit 中隐藏输入类型 ="range"slider-thumb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20111315/