gpt4 book ai didi

javascript - 将日期输入三 Angular 形更改为日历图标

转载 作者:技术小花猫 更新时间:2023-10-29 11:45:11 31 4
gpt4 key购买 nike

现在我专注于让 Google Chrome 中的 input[type="date"] 显示日历图标 (.png),而不是默认使用的向下三 Angular 形。我试着用 styling the Shadow elements 做点什么在输入中,但这需要我移动所有其他元素,因为它们使用的是 flexbox,所以它看起来不是很简单。我还希望一直显示日历图标,但我还没有想出办法做到这一点。

最佳答案

下面的代码适合我

input[type="date"]::-webkit-calendar-picker-indicator {
color: rgba(0, 0, 0, 0);
opacity: 1;
display: block;
background: url(https://mywildalberta.ca/images/GFX-MWA-Parks-Reservations.png) no-repeat;
width: 20px;
height: 20px;
border-width: thin;
}
<input type="date" />

关于javascript - 将日期输入三 Angular 形更改为日历图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29436074/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com