【问题标题】:how to edit input type data with CSS [duplicate]如何使用 CSS 编辑输入类型数据 [重复]
【发布时间】:2016-09-24 13:27:38
【问题描述】:

我正在尝试编辑我的输入日期,尤其是日历和箭头框。 这是我的代码:

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 jquery html css input


【解决方案1】:

这是不可能的。浏览器会创建一个您无法设置样式的日历的shadow-root

您添加了 标签,所以可能看起来像jQuery Datepicker

【讨论】:

  • 谢谢!我会试试的
猜你喜欢
  • 2011-06-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-09-19
  • 2012-11-10
  • 2015-03-27
  • 2019-06-01
  • 2021-11-13
相关资源
最近更新 更多