如果我们使用输入日期标签,就会显示这种格式。
我只是想隐藏 "日" 中的日期输入。于是我这样做了。它就消失了。
input::-webkit-datetime-edit-day-field{
display: none;
}
问题是
它显示额外的破折号 "" 符号有。我只是想把这个也去掉。
我使用css first child这样的,并尝试针对第一个孩子,但它不工作。
input::-webkit-datetime-edit-fields-wrapper ::-webkit-datetime-edit-text:first-child {
display: none;
}
有什么办法可以隐藏这个?https:/jsfiddle.netmdoty2g9
<!DOCTYPE html>
<html>
<body>
<h1>Show a Date Control</h1>
<form action="/action_page.php">
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
<input type="submit">
</form>
<p><strong>Note:</strong> type="date" is not supported in Safari or Internet Explorer 11 (or earlier).</p>
</body>
</html>