This question already has answers here:
Are there any style options for the HTML5 Date picker?
(6个答案)
三年前关闭。
我正试图编辑我的输入日期,准确地说是日历和箭头框。
这里是我的代码:
input[type="date"] {
  color: #888;
  background-color: #eee;
  border: 2px solid #ccc;
  text-align: center;
  border-radius: 10px;
  width: 100%;
  font-size: 14px;
  font-family: 'sans-serif';
}

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Date</title>
</head>
<body>
<input type="date">
</body>
</html>

这里是我想编辑的
javascript - 如何使用CSS编辑输入类型数据-LMLPHP

最佳答案

不可能。浏览器会创建一个shadow-root日历,您无法设置其样式。
您添加了jquery标记,因此可能看起来像jQuery Datepicker

关于javascript - 如何使用CSS编辑输入类型数据,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37462598/

10-14 15:37
查看更多