【问题标题】:css Hyphens not working in chrome [duplicate]css连字符在chrome中不起作用[重复]
【发布时间】:2017-12-08 21:44:02
【问题描述】:

在我的项目段落中(在 p 标签中)我给出了 text-align:justify;但在某些方面有更多的空间,所以我尝试这个解决方案: HTML 代码:

<p>What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>

CSS 代码:

p{
    text-align:justify;
    word-break: break-all;
    hyphens: auto;
}

但在这段代码中,mozilla 可以工作,但不能在 chrome 中工作,为此我尝试

p{
    text-align:justify;
    -ms-word-break: break-all; 
    word-break: break-all; 
    word-break: break-word; 
   -webkit-hyphens: auto; 
   -moz-hyphens: auto; 
   hyphens: auto;
}

在css下面有-webkit-用于chrome正确但仍然无法正常工作请帮助,请给出解决方案......

【问题讨论】:

  • 万一其他人犯了我犯的错误,只有在 HTML 标签中声明语言时,连字符才有效。例如:&lt;html lang="en-GB"&gt;

标签: html css google-chrome


【解决方案1】:

这是适用于 Windows、Linux 和 ChromeOS 的 Chrome 中的 known bug

【讨论】:

  • 我使用的是谷歌浏览器最新版本 (62.0.3202.94)。
  • @designmetR — 那么?该错误在任何版本中均未标记为“已修复”。
  • 还有其他解决方案,因为它在 Mozilla Firefox 中运行良好。
  • 这个虫子也咬了我!
猜你喜欢
  • 1970-01-01
  • 2018-06-25
  • 2013-11-04
  • 2016-05-16
  • 2013-07-25
  • 2011-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多