【发布时间】:2020-01-06 19:00:59
【问题描述】:
我已经创建了一个滑块。
我创建了一个代码笔来解释和展示我的问题:https://codepen.io/glalloue/pen/QGKqNd
已应用 Css(较少):
.form input[type=range] {
z-index: 1;
align-self: stretch;
height: 3px;
-webkit-appearance: none;
appearance: none;
border: none;
margin: 0;
&::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
border: none;
width: 2.5rem;
height: 2.5rem;
background-color: white;
border-radius: 50%;
box-shadow: inset 0 0 0 1px #cccccc, 0 2px 4px rgba(0, 0, 0, 0.2);
}
&::-ms-thumb {
appearance: none;
border: none;
width: 2.5rem;
height: 2.5rem;
background-color: pink;
border-radius: 50%;
box-shadow: inset 0 0 0 1px #C0C0C0, 0 2px 4px rgba(0, 0, 0, .2);
}
}
这是一个与 Internet Explorer 类似的问题:::-ms-thumb appears behind track
建议的解决方案是向 ::-ms-track 添加边距,但没有成功。
有什么方法可以让我在 MS edge 中的 ::-ms-thumb 看起来与在 chrome 上的完全一样?
【问题讨论】:
-
@Rahul :我不确定要在您的链接中使用什么。我试图在 -ms-thumb 上设置 z-index 但没有任何反应,
标签: css less range microsoft-edge