我有一些类似这样的 html,css:
<div style="width: 40em; text-align: center;">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy tex
</div>
最佳答案
Web 浏览器自动显示文本,直到 block 宽度结束。如果你想要不同的东西,你必须休息一下。
<div style="width: 40em; text-align: center;">
Lorem Ipsum is simply dummy text<br>
of the printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy tex
</div>
关于html - CSS 居中多行文本但最短的行在最上面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17497448/