gpt4 book ai didi

css - 在 chrome 中为下拉菜单设置字体大小似乎不会影响样式

转载 作者:行者123 更新时间:2023-12-04 21:22:16 25 4
gpt4 key购买 nike

我在 chrome 中设置了下拉菜单的字体大小,但它似乎并没有改变 <select> 的大小。

它适用于 FF - 当我将字体大小设置为 15px 时,它明显更大

最佳答案

如果 Chrome 和 Safari 只是忽略您的 heightfont-familyfont-size CSS 设置来选择:添加边框属性可以帮助 Webkit 遵守您的设置。

例子:

select {
border: 1px solid #a4a4a4; /*Same grey as default appearance*/
( background: transparent; /*Would work too, but adds an ugly black border*/ )
font-family: times; /*Now in webkit too*/
font-size: 30px; /*Now in webkit too*/
}

关于css - 在 chrome 中为下拉菜单设置字体大小似乎不会影响样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5659555/

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