【发布时间】:2015-10-15 07:40:21
【问题描述】:
我有一个span,里面有文字,它有一个max-width 属性。
有时里面的文本比最大宽度大,所以跨度会断线。到这里没问题。
但是当文本中断时,它旁边的元素看起来也没有下降。这是一个例子
<span> some text with fine width</span> <div> the div</div>
这将输出如下内容:
some text with fine width the div
但是当文本很长时,它看起来像这样:
<span> some text with more the max width</span> <div> the div</div>
some text with more the div
the max width
我希望它看起来像这样:
some text with more
the max width the div
我设法做到了:
some text with more
the max width the div
但我希望该 div 紧挨着文本的最后一行。 这可以通过 css 实现吗?
【问题讨论】:
-
请将您当前的 HTML 和 CSS 添加到您的问题中,以便我们重现该问题。
-
你的
CSS文件在哪里?