适当缩进HTML中的有序列表 [英] proper indenting for ordered lists in html
本文介绍了适当缩进HTML中的有序列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法获得显示正确缩进的有序列表。
这些数字都右对齐。
因此,浏览器(Chrome)在单位数数字之前显示一个空格,并且仅将双位数数字正确地对齐到左侧。
I cannot get an ordered list to show proper indenting. The numbers are all aligned to the right. So the browser (Chrome) shows a space before the single digit numbers and only aligns the double digit numbers correctly to the left.
如何输出
推荐答案
实际上,解决方案非常简单,只需设置
Actually, the solution is pretty simple, just set
ol {list-style-position: inside;}
您的数字应该向左对齐。
And your numbers should "align to the left" like you want.
这篇关于适当缩进HTML中的有序列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文