gpt4 book ai didi

css - 输入字段的日期选择器选择器

转载 作者:太空宇宙 更新时间:2023-11-04 06:48:53 26 4
gpt4 key购买 nike

我正在尝试更改在某些浏览器中显示的日期选择器的颜色,但不知道选择器的名称。

HTML:

<form action="pledge.html" method="post">       
<input type="date" id="birthday" name="user_bday">
</form>

CSS:

body {
background-color: black;
}

input {
height: 45px;
width: 40%;
border-width: 3px;
border-style: solid;
border-color: white;
border-radius: 90px;
margin: 10px;
text-align: center;
font-size: 24px;
color: white;
font-weight: bold;
background-color: transparent;
outline: none;
}

input[type="date"] {
/*Something Goes Here Probably*/
}

这是一个 fiddle

https://jsfiddle.net/froggomad/gznx60j1/25/

谢谢!

最佳答案

webkit默认只有8个伪元素可以自定义

::-webkit-datetime-edit
::-webkit-datetime-edit-fields-wrapper
::-webkit-datetime-edit-text
::-webkit-datetime-edit-month-field
::-webkit-datetime-edit-day-field
::-webkit-datetime-edit-year-field
::-webkit-inner-spin-button
::-webkit-calendar-picker-indicator

遗憾的是,没有跨浏览器的方式来设置原生日期选择器的样式。

关于css - 输入字段的日期选择器选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53033116/

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