且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在HTML中的项目符号点之前添加空间

更新时间:2022-12-31 16:31:12

默认情况下,项目符号点前有 个空格.如果没有,您可能正在使用某种重置CSS".

There is spacing before bullet points by default. If there isn’t, you are probably using a "Reset CSS" of some kind.

要将间距设置为所需值,请将ulli元素的padding-leftmargin-left都设置为零,然后将其中之一设置为所需值.

To set the spacing to a desired value, set padding-left and margin-left of both ul and li elements to zero and then set one of them to the desired value.