示例您还可以自定义弹出窗口并添加背景颜色。您可以尝试运行以下代码来为 html 日期选择器添加样式选项 -
::-webkit-datetime-edit { padding: 4 em; }::-webkit-datetime-edit-fields-wrapper { background:blue; }::-webkit-datetime-edit-text { padding: 0 0.5em; }
以下是编辑月、日和年字段 -
::-webkit-datetime-edit-month-field { color: white; }::-webkit-datetime-edit-day-field { color: red; }::-webkit-datetime-edit-year-field { color: red; }::-webkit-calendar-picker-indicator { background:gray; }
以上就是html5日期选择器有哪些样式选项吗?的详细内容。
