0

我需要一些帮助来修改 html 日期控件(自定义日期格式)。我坚持跨浏览器兼容性。在 Chrome 中,它工作正常,但 safari 无法显示该值。我在跨浏览器中不太好兼容性..以下是描述问题的链接...

JSFiddle

input {
    position: relative;
    width: 150px; height: 20px;
    color: white;
}

input:before {
    position: absolute;
    top: 3px; left: 3px;
    content: attr(data-date);
    display: inline-block;
    color: black;
}

input::-webkit-datetime-edit, input::-webkit-inner-spin-button, 
input::-webkit-clear-button {
    display: none;
}

input::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 3px;
    right: 0;
    color: black;
    opacity: 1;
}

在此先感谢..有人可以提供解决方案..

4

0 回答 0