【发布时间】:2015-07-14 21:54:15
【问题描述】:
我一直在尝试在 input type='datetime-local' 字段中添加占位符,但它根本不起作用。使用 css 解决问题,但仍然无法做到:(
input[type="datetime-local"]:before{
content: 'Selecteer Datum';
color: #000;
text-align: center;
width:100%;
}
input[type="datetime-local"]:active:before, input[type="datetime-local"]:hover:before, input[type="datetime-local"]:visited:before, input[type="datetime-local"]:focus:before{
content: '';
width: 100%;
}
<form action="" method="post">
<div class="datetime">
<input type="datetime-local" >
</div>
</form>
【问题讨论】:
-
检查 SO 上提出的类似问题。 stackoverflow.com/questions/20321202/…
标签: javascript css html forms