Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html “白色”;背景“;使用边界半径时的输入范围_Html_Css - Fatal编程技术网

Html “白色”;背景“;使用边界半径时的输入范围

Html “白色”;背景“;使用边界半径时的输入范围,html,css,Html,Css,你可以找到我问题的截图;在尝试设置范围输入的样式时,我注意到它有白色的角。我似乎不明白为什么或者如何删除它们,我起初认为这是一个大纲,但将大纲设置为“无”并没有起到任何作用。下面是一个JSFIDLE: 我的CSS input[type=range] { -webkit-appearance: none; width: 200px; } input[type=range]::-webkit-slider-runnable-track { width: 200px;

你可以找到我问题的截图;在尝试设置范围输入的样式时,我注意到它有白色的角。我似乎不明白为什么或者如何删除它们,我起初认为这是一个大纲,但将大纲设置为“无”并没有起到任何作用。下面是一个JSFIDLE:

我的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;
}

默认情况下,如果您刚刚添加,则输入标记具有由chrome设置的白色背景

background-color :#565656 ;
对于您的第一个输入选择器,它应该可以解决您的问题

input[type=range] {
    -webkit-appearance: none;
    width: 200px;
    background-color: transparent;
}
解决办法是什么

你应该添加到

input[type=range] {
    -webkit-appearance: none;
    width: 200px;
    background: transparent;
}

我想这是你的问题。这里已经解决了:是的,但是这去掉了边界半径,使其成为一个矩形。你实际上只是复制了Ruchit Patel的答案。