0

我有一些类似于此的 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>

像这样呈现,但我希望最短的线位于顶部,就像这样。我无法弄清楚如何做到这一点,任何帮助将不胜感激!

4

1 回答 1

1

文本由网络浏览器自动显示,直到块宽度结束。如果你想要一些不同的东西,你必须使用休息。

<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>
于 2013-07-05T22:17:02.540 回答