小编Sci*_*ear的帖子

当嵌套在具有表格显示的元素内部时,为什么无包装宽度计算会发生变化?

在我们的设计中,我们最终需要多列来显示带有省略号的标题,我不希望这些标题是一个大问题但是当它们嵌套在display: table计算中时似乎是不正确的.

需要注意的是,我们需要一个响应式布局,因此需要百分比宽度(固定宽度可以解决问题).我们的布局确实需要display: table更多的树,如果没有主要的重构,我无法删除它.

如果你删除显示屏,一切都按照我的预期运作:

预期

但是,具有该显示会导致父级考虑预先截断的子元素总宽度(但考虑到nowrap).就好像初始渲染没有定义溢出一样,并在事后添加它(但到那时宽度计算太大了).

结果

我可以猜测为什么渲染会破坏,但我想要一个关于浏览器渲染方式的更明确的答案......(在Mac上的Chrome/FF/Safari中测试过)

css

6
推荐指数
1
解决办法
322
查看次数

The width seems to be zero (or NaN) always for an svg:text element in Firefox 15

I am using d3 to make a chart with multiple paths. I am displaying the path(s) description on the left hand side. The data & descriptions are dynamic so the size of the legend is naturally also dynamic, since it is not a big deal as long as I know the size of the text (just a minor adjustment to the domain/range). The problem is that I do not see an easy way to find the size of the text …

javascript charts svg nan d3.js

3
推荐指数
1
解决办法
1376
查看次数

标签 统计

charts ×1

css ×1

d3.js ×1

javascript ×1

nan ×1

svg ×1