gpt4 book ai didi

css - Firefox 和 Chrome 中的输入高度差异

转载 作者:数据小太阳 更新时间:2023-10-29 09:16:08 32 4
gpt4 key购买 nike

为什么 Chrome 的输入高度比 Firefox 的输入高

请参阅此处的示例 http://jsfiddle.net/jitendravyas/89Msh/1/

select, input, textarea, button {
font: 99% sans-serif;
}

input, select {
vertical-align: middle;
}

body, select, input, textarea {
color: #444444;
}

button, input, select, textarea {
margin: 0;
}


input, textarea {
font-family: inherit;

line-height: 1.5;
}


input {
border: 0 none;
font-size: 32px;
line-height: 1.1;
margin-right: 29px;
padding: 3px 3px 0;
width: 206px;
border-radius: 7px;
}

最佳答案

问题本质上是 line-height

Chrome 看到 line-height 很像它看到 height 而 Firefox 没有。

向输入添加高度应该可以解决问题,但您应该注意您的 line-heightheight 匹配。

例如:高度:20px;行高:20px;.

http://jsfiddle.net/e2agj/1/ - 最后一个示例输入是正确的。

关于css - Firefox 和 Chrome 中的输入高度差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7229568/

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