【问题标题】:Super slow rendering in chromechrome渲染速度超慢
【发布时间】:2016-05-16 17:32:46
【问题描述】:

为什么渲染这么慢?

https://jsfiddle.net/g3xf5hyy/

在 IEa 和 Firefox 中运行速度非常快。

  .xxx {
    padding: 6px;
    border: 1px solid silver;
    background-color: #f7f7f7;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
  }





<div>


  <div>

    <div>

      <div class="xxx">
very-long-line-without-any-line-breaks-thousands-of-chars
    </div>


  </div>
</div>
</div>

【问题讨论】:

    标签: css google-chrome opera


    【解决方案1】:

    这是一个有趣的问题,我一定会尝试找到根本原因。 由于您的班级低于css,它的速度很慢

         word-break: break-all;
    

    从你的 CSS 中删除它,它会正常工作。

    https://jsfiddle.net/g3xf5hyy/2/

    【讨论】:

    • 我可以让这个 StackOverflow 页面在 Chrome 57(但不是 Firefox 47)中变慢,方法是使用小书签注入规则 * { column-count: 1 !important; } 这会导致键盘的 Page Up 和 Page Down 键变得相当无响应(虽然鼠标滚轮没问题),我只在这个 StackOverflow 页面上复制了它(2017 年 4 月的格式)。当我的stylesheets for low vision 与它一起使用时,我在尝试解决最近版本的 Chrome 中的烦恼时发现了这一点。我对 Google 的印象是他们不听错误报告。
    猜你喜欢
    • 2011-10-04
    • 2015-05-23
    • 2014-04-20
    • 1970-01-01
    • 1970-01-01
    • 2013-06-24
    • 1970-01-01
    • 1970-01-01
    • 2014-12-17
    相关资源
    最近更新 更多