<div style="font-family: Arial, Helvetica, sans-serif;"><p class="article_content" style="margin-top: 2px;font-size: 15px;text-align: justify;color: #ffffff;margin-bottom: 2px;margin-left: 2px;width: 155px;white-space: pre-line;">Energy & Natural Resources(4)</p></div>
输出的屏幕截图-
我想避免在“Energy”和“&”以及“Resources”之间有多余的空格,并将与此输出类似的单词换行。
我尝试了以下 css: white-space: pre-line;/* white-space: pre; *//* word-wrap: break-word; *//* 分词:分词; */
,但我仍然看到相同的输出
最佳答案
删除这个:text-align: justify
关于css - 避免两个词之间不需要的间隙,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34525032/