【发布时间】: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 标签中声明语言时,连字符才有效。例如:
<html lang="en-GB">
标签: html css google-chrome