[英]White “background” on input range when using border radius
You can find a screenshot of my problem here ; 你可以在这里找到我的问题的截图; While trying to style the range input I noticed that it has white corners.
在尝试设置范围输入的样式时,我注意到它有白色角落。 I can't seem to figure out why or how to remove them, I first thought it was an outline but setting outline to none did nothing.
我似乎无法弄清楚为什么或如何删除它们,我首先认为这是一个大纲,但设置大纲没有做任何事情。 Here is a JSFiddle: http://jsfiddle.net/c1y0y7dj/
这是一个JSFiddle: http : //jsfiddle.net/c1y0y7dj/
My CSS 我的CSS
input[type=range] {
-webkit-appearance: none;
width: 200px;
}
input[type=range]::-webkit-slider-runnable-track {
width: 200px;
height: 5px;
background: #565656;
border: none;
border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #F06A00;
margin-top: -5px;
}
input[type=range]:focus {
outline: none;
}
input[type=range]::-moz-range-track {
width: 200px;
height: 5px;
background: #ddd;
border: none;
border-radius: 3px;
}
input[type=range]::-moz-range-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #F06A00;
}
input[type=range]::-ms-track {
width: 200px;
height: 5px;
background: transparent;
border-color: transparent;
border-width: 6px 0;
color: transparent;
}
input[type=range]::-ms-fill-lower {
background: #373737;
border-radius: 10px;
}
input[type=range]::-ms-fill-upper {
background: #575757;
border-radius: 10px;
}
input[type=range]::-ms-thumb {
border: none;
height: 16px;
width: 16px;
border-radius: 50%;
background: #F06A00;
}
input[type=range]:focus::-ms-fill-lower {
background: #373737;
}
input[type=range]:focus::-ms-fill-upper {
background: #575757;
}
Try this css 试试这个css
input[type=range] {
-webkit-appearance: none;
width: 200px;
background-color: transparent;
}
The input tag by default has a white background set by chrome if you just added 默认情况下,输入标记具有由chrome添加的白色背景
background-color :#565656 ;
to your first input selector it should solve your issue 到你的第一个输入选择器它应该解决你的问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.