我有一些类似的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>
的呈现方式与this类似,但我希望最短的一行显示在最前面,例如this。 我无法弄清楚如何做到这一点,任何帮助将不胜感激!
答案 0 :(得分:1)
文本由Web浏览器自动显示,直到块宽结束。如果你想要不同的东西,你必须休息一下。
<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>