如何更改html5日期输入上的图标背景?

问题描述

当我需要输入一个小的日期(100px左右)时,日期被白色区域截断,我认为这是日历图标的额外填充或白色背景。

enter image description here

.datepicker{
    width: 100px;
}
<input type="date" value="2015-03-02" class="datepicker">

如何删除此填充或白色背景或使其透明或更小?

解决方法

我发现这个 post 他们展示了一种定位单个日期输入组件的方法。

我玩了一会儿,发现这解决了问题: ::-webkit-calendar-picker-indicator { margin-left: 0px; }