【问题标题】:white-space: nowrap causing error in lighthouse空白:nowrap 导致灯塔错误
【发布时间】:2020-12-03 15:32:12
【问题描述】:

其他人在使用 chrome 开发工具时遇到 lighthouse 问题并给出错误报告

white-space: nowrap;

如果我删除我的 css white-space: nowrap; 中的行,灯塔会再次工作。 这是我通过行 white-space: nowrap; 得到的错误报告。

【问题讨论】:

  • 你有包含这个的完整 CSS 选择器吗,看起来你发现了一个有趣的错误。你测试的 URL 是什么?

标签: lighthouse


【解决方案1】:

我设法通过更改这个来纠正错误:

.text-truncate {
     overflow:      hidden;
     text-overflow: ellipsis;
     white-space:   nowrap;
}

到:

.text-truncate {
     overflow:      hidden;
     text-overflow: ellipsis;
     white-space:   nowrap;
     clip:          rect(0 0 0 0);
     clip-path:     inset(0%); 
}

【讨论】:

  • 你好安娜,欢迎来到 StackOverflow!你的答案似乎不适合这个问题?
猜你喜欢
  • 2023-03-21
  • 1970-01-01
  • 2019-05-16
  • 1970-01-01
  • 2014-04-06
  • 2017-05-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多