我使用默认的HTML5 样本代码行: 我使用了自定义背景。我想删除右侧出现的黑色箭头。
示例代码
答案 0 :(得分:6)
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}
或
/* Hide the cancel button */
::-webkit-search-cancel-button {
-webkit-appearance: none;
}
/* Hide the magnifying glass */
::-webkit-search-results-button {
-webkit-appearance: none;
}
/* Remove the rounded corners */
input[type=search] {
-webkit-appearance: none;
}
答案 1 :(得分:2)
箭头
input[type="time"]::-webkit-inner-spin-button {
-webkit-appearance: none;
}
清除(x)按钮
input[type="time"]::-webkit-clear-button {
-webkit-appearance: none;
}