gpt4 book ai didi

html - 显示 :table-cell behaving differently in Firefox and Chrome

转载 作者:搜寻专家 更新时间:2023-10-31 22:32:33 25 4
gpt4 key购买 nike

我在 Chrome 中构建了一个图表,如下所示: enter image description here

但在 Firefox 中它看起来像这样: enter image description here

我很确定这种差异是 display:table-cell 在两个浏览器中的处理方式不同造成的。但我不确定如何解决它。我上传了一个现场演示 here这样您就可以检查代码。

最佳答案

为了修复它:

  1. display: table-row应用于.graph
  2. .series 上使用 inline-block 而不是 table-cell
  3. 避免使用疯狂的 float 百分比(如 14.2857%),因为浏览器的数学引擎几乎总是以不同的方式进行舍入。

关于html - 显示 :table-cell behaving differently in Firefox and Chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12572984/

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