间距断线 [英] Span line break
本文介绍了间距断线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下问题:
Html:< span class =info>< / span>
CSS:
span.info{
margin-left: 10px;
color: #b1b1b1;
font-size: 11px;
font-style: italic;
font-weight:bold;
}
任何想法如何排列第二行?
Any idea how to align the second line?
推荐答案
display:block;
那么你有一个块元素,并将边距添加到所有行。
then you've got a block element and the margin is added to all lines.
虽然一个跨度在语义上不是一个块元素,但有些情况下你不能控制页面DOM。这个回答是针对那些。
While it's true that a span is semantically not a block element, there are cases where you don't have control of the pages DOM. This answer is inteded for those.
这篇关于间距断线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文