gpt4 book ai didi

css - 谜: React + Radium: 2 Phanton Pixels of extra height for no apparent reason

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

我正在投影图像,然后检查它:

enter image description here

enter image description here

高度是20px。这是正确的。

然后我检查包含 imgdata-radium 元素,令我惊讶的是:

enter image description here

enter image description here

尽管没有内容,该元素的高度“增长”了两个像素。此外,data-radium 元素没有填充,没有边距,我认为没有任何东西会增加高度。

enter image description here

有谁知道那些额外的 2 个像素从何而来?这让我抓狂。

最佳答案

由于我无法检查代码,所以我会尝试猜测:由于默认情况下图像是内嵌的,因此任何行高定义都会被继承。将图像设置为 block 元素可能会起作用,因为将行高设置为 1。

关于css - 谜: React + Radium: 2 Phanton Pixels of extra height for no apparent reason,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56638435/

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