小编Luc*_*rst的帖子

Chrome 78.0.3904.70上的“空白:nowrap”问题

自Chrome v78.0.3904.70发布以来,我发现 CSS属性的使用存在问题white-space: nowrap;。不间断的空格似乎导致换行。使用时text-overflow: ellipsis,实际文本将不会显示,因为它在容器外部被打断了。似乎只有在文本太长而无法显示时才会发生。

.box-inline {
    max-width: 120px;
    overflow: hidden;
    height: 16px;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    white-space: nowrap;
}
Run Code Online (Sandbox Code Playgroud)
<div class="mar-rgt box-inline text-sm"><span class="label" style="background: rgb(176, 223, 246);"></span>&nbsp;Not meeting expecations</div>
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

它在我们的应用程序上引起了一些显示问题。这是错误还是我的代码有问题?

该代码在React 16中呈现。

html css whitespace google-chrome

10
推荐指数
1
解决办法
998
查看次数

标签 统计

css ×1

google-chrome ×1

html ×1

whitespace ×1