简体   繁体   English

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

[英]How to remove indents from HTML list?

<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>

I have the above HTML . 我有上面的HTML What CSS coding can I add above this HTML that will stop the text being indented by the <li> tags? 我可以在此HTML上方添加什么CSS编码,以防止<li>标签使文本缩进?

Try this: 尝试这个:

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

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

Ol {margin:0;
      Padding:0;}

what do you mean under 'text indent'? 您在“文本缩进”下是什么意思? using tag you get numbered list, and in your case you get twice numbered list. 使用标记,您会得到编号列表,在这种情况下,您将获得两次编号列表。 try this style to prevent list numbering 尝试这种样式以防止列表编号

ol { list-style:none; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM