我正在使用 html/css 和 text-align: justify;当我使用第二行下面的文字时,单词之间有很大的差距。其余的东西都很好。
<p style="text-align: justify;">Lorem Ipsum is simply dummy text of the <a href="http://example.com"> example </a>and Lorem Ipsum is simply dummy text of the lorem. I'm also 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. It has survived not only five centuries, but also the leap into electronic </p>
我在第 2 行的每个单词之间得到了很多额外的空格。我该如何解决? 像这样:
Lorem Ipsum is simply dummy text of the Lorem Lorem Lorem Lorem Lorem
text of the lorem. I'm also printing and typesetting industry.
Lorem Ipsum has been
最佳答案
text-align: justify;
展开一行以确保行尾没有空隙。为此,它必须在中间添加额外的空格。
如果您不想这样做,请不要执行 text-align: justify;
,或者告诉我们您希望它做什么?也许你想要 text-align: left
?
:)
关于html - 删除 html/css 中单词之间的额外空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46718427/