在HTML5中,对于input type="date"字段不显示占位符。如何解决这个问题?
要显示它,使用以下内容 −
<input placeholder = Date class = textbox-n type = text onfocus = (this.type = 'date') id = date>
您还可以选择CSS −
input[type=date]::before{ color: #ffffff; content: attr(placeholder) : ; } input[type=date]:focus::before { content: !important; }
以上就是在HTML5中,对于input type=date字段不显示占位符。如何解决这个问题?的详细内容,更多请关注双恒网络其它相关文章!