[英]Fields in Windows Chrome differ in height from all other browsers, despite no height setting
Apologies for the live link but I am unable to replicate this in JSFiddle or others. 对实时链接表示歉意,但我无法在JSFiddle或其他公司中复制它。
I am having an issue with the height of input fields in Windows Chrome only. 我仅在Windows Chrome中输入字段的高度有问题。
Currently my inputs are outputting at 56px high. 目前,我的输入输出为56px高。
However, the font size is 16px
, the padding is 8px
all round and the bottom border is 3px
therefore the input, including border, should only be 35px
Yet it is outputting 20px
taller. 但是,字体大小为16px
,填充全部为8px
,底部边框为3px
因此输入(包括border)应仅为35px
,但输出的高度要高20px
。
This is how the look on Windows Chrome: 这是Windows Chrome浏览器的外观:
And here is the live link, you will find the form at the bottom of the page if you click 'contact us' 这是实时链接,如果您单击“联系我们”,则会在页面底部找到表格。
It has a height of 37px, which is set by the browser itself and is never overruled in your CSS. 它的高度为37px,由浏览器自行设置,在CSS中绝对不会被覆盖。 To the height, the padding and border are added (2x8 + 3), bringing the total to 56px. 在高度上添加了边框和边框(2x8 + 3),使总数达到56px。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.