如何证明这段文字的合理性?? 我已经尝试并搜索了好几天才能找到如此简单易用的东西..
例如:
HTML:
<div id="justify">
<p>I just want this to justify..</p>
</div>
CSS:
#justify {
width: 100%;
background: #D33;
}
#justify p {
margin: 0 auto;
max-width: 70%;
list-style: disc outside none;
text-align: justify;
display: list-item;
background: #ccc;
}
在 JSFiddle 上:
如有任何帮助,我们将不胜感激。
最佳答案
#justify p:after {
content: "";
display: inline-block;
width: 100%;
}
通过一些 HTML 技巧,这应该可以工作。很久以前,当我遇到类似问题时,我在一篇博客文章中发现了它。在 JSFiddle 上查看
关于html - 对齐段落文本 HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21668120/