【问题标题】:Hiding arrow from date input从日期输入中隐藏箭头
【发布时间】:2020-04-30 03:14:32
【问题描述】:

我试图从日期输入中隐藏额外的信息和箭头,但它没有隐藏在 Chrome 浏览器中,它确实隐藏在 IE 中。

我正在使用以下 CSS,但看不到任何错误。

input[type=date]:-webkit-datetime-edit,
input::-webkit-inner-spin-button,
input::-webkit-clear-button {
    display: none;
}

【问题讨论】:

标签: javascript jquery css input


【解决方案1】:

你可以试试这个:

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

或者您可以在 HTML 中包含一个类,例如 .remove--arrow,然后试试这个:

.remove--arrow {
    -webkit-appearance: none;
}
.remove--arrow::-webkit-inner-spin-button,
.remove--arrow::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-23
    • 1970-01-01
    • 1970-01-01
    • 2016-02-18
    • 1970-01-01
    • 2020-02-08
    • 2017-05-12
    相关资源
    最近更新 更多