如何从HTML列表中删除缩进?

时间:2016-03-02 23:58:43

标签: html css html-lists

<ol>
<li>1. This Convention shall be binding only upon those Members of the International Labour Organisation whose ratifications have been registered with the Director-General.</li>
<li>2. It shall come into force twelve months after the date on which the ratifications of two Members have been registered with the Director-General.</li>
<li>3. Thereafter, this Convention shall come into force for any Member twelve months after the date on which its ratification has been registered.</li>
</ol>

我有以上HTML。我可以在CSS之上添加哪些HTML代码,以阻止文本被<li>标记缩进?

3 个答案:

答案 0 :(得分:0)

试试这个:

ol {
  list-style: none;
  padding-left: 0;
}

小提琴:https://jsfiddle.net/5ox2bujd/

答案 1 :(得分:0)

Ol {margin:0;
      Padding:0;}

答案 2 :(得分:0)

你在'文字缩进'下是什么意思?使用标签你会得到编号列表,在你的情况下你得到两次编号列表。尝试这种风格以防止列表编号

ol { list-style:none; }