Remove background arrow from date input in Google Chrome v20

后端 未结 6 1534
我寻月下人不归
我寻月下人不归 2020-11-28 08:06

Since Google Chrome v20 a new calendar has been added to date inputs. The issue with this is that I\'m using javascript to create my own calendar and I have an icon already

6条回答
  •  抹茶落季
    2020-11-28 08:47

    You can put it like this

    input[type="date"]::-webkit-calendar-picker-indicator{
           background-image: url(images/calendar-icon.png);
           background-position: center;
           background-size: 20px 20px;
           background-repeat: no-repeat;
          color: rgba(204,204,204,0);
    }
    

    by putting the color attribute into 0 opacity you will make the arrow disappear

提交回复
热议问题