来自第二行的保证金

时间:2012-09-26 08:21:05

标签: html css

我正在尝试从第二行开始保留文本。我只知道文字间距&保证金,但在这种情况下没有帮助。如何做到如下图。

enter image description here

3 个答案:

答案 0 :(得分:2)

您可以使用HTML中的内置编号列表。即<ol>标签:

演示http://jsfiddle.net/x9v2t/

<强>代码

<ol>
    <li>Hello World. This is a line in this paragraph that can span mulitple lines. Hello World. This is a line in this paragraph that can span mulitple lines.</li>
    <li>Hello World. This is a line in this paragraph that can span mulitple lines. Hello World. This is a line in this paragraph that can span mulitple lines.</li>
    <li>Hello World. This is a line in this paragraph that can span mulitple lines. Hello World. This is a line in this paragraph that can span mulitple lines.</li>
</ol>

答案 1 :(得分:1)


你现在习惯了这个

 p+p{
  margin-top:10px;}

Live demo

答案 2 :(得分:1)

我希望这对你有帮助..

 <dl>
 <dt>1. Coffee</dt>
 <dd>black hot drink</dd>
 <dt>2.Milk</dt>
 <dd>white cold drink</dd>
 </dl> 

演示fiddle

否则使用此

<ol>
<li></p>Something here...</p></p>Something more here...</p></p>Something something something</p> </li>
<li></p>Something else...</p></p>Something else here...</p></p>Something something something</p> </li>
</ol>
  1. 这里的东西...

    此处还有更多......

    什么东西

  2. 其他东西......

    此处有其他东西...

    东西什么东西