【发布时间】:2021-06-23 14:19:42
【问题描述】:
为自我支持创建一个小滑块不仅在 webkit 浏览器中必须使用像这样的 scss 模板
input {
width: 100%;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: 1vmin;
}
input::-webkit-slider-thumb {
cursor: pointer;
-webkit-appearance: none;
appearance: none;
width: 2vmin;
height: 2vmin;
background: red;
}
input::-moz-range-thumb {
cursor: pointer;
-moz-appearance: none;
appearance: none;
width: 2vmin;
height: 2vmin;
background: red;
}
<!DOCTYPE html>
<body>
<input type="range">
</body>
</html>
其中 -webkit-slider-thumb 和 -moz-range-thumb 位于不同的行,但为什么会有这样的变体
input {
width: 100%;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
height: 1vmin;
}
input::-webkit-slider-thumb, input::-moz-range-thumb {
cursor: pointer;
-webkit-appearance: none;
appearance: none;
width: 2vmin;
height: 2vmin;
background: red;
}
<!DOCTYPE html>
<body>
<input type="range">
</body>
</html>
不工作?我注意到这个功能只有引擎的属性
【问题讨论】:
标签: css