gpt4 book ai didi

css - 固定宽度为 33.333% 的 3 个容器的 1px 间隙

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

这很难用语言解释,但我看到 3x 容器的 1 像素线,宽度为 33.3333%,作为 material-ui 的一部分,我无法更改它

<div class="container">
<div class="panel" style="width:width of 33.3333%">
<!-- Content here -->
</div>
<div class="panel" style="width:width of 33.3333%">
<!-- Content here -->
</div>
<div class="panel" style="width:width of 33.3333%">
<!-- Content here -->
</div>
</div>

所以这就是我得到的,我只是因为它的 33.333%,将它设置为 25% 或 50% 并且问题消失了,我用一点红色(油漆)标记了像素线。

enter image description here

这是 material-ui <gridList>, <GridItem><Cards>这很令人沮丧。

编辑

试用 33.33 / 33.33 / 33.34仍然返回 1px 的差距!

最佳答案

33.333 与 1/3 不同,因此可能存在舍入问题。我建议选择整数值(例如 33、33、34)来简化必须由布局引擎完成的舍入。

关于css - 固定宽度为 33.333% 的 3 个容器的 1px 间隙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40677219/

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