在CSS中,我们可以通过设置margin或padding属性来控制各li之间的间距。首先,我们需要使用ul和li标签来创建列表。以下是一个例子:<ul> <l
<ul> <li>列表项1</li> <li>列表项2</li> <li>列表项3</li> </ul>
<style> ul { margin: 0; padding: 0; } li { margin-bottom: 10px; } </style>
<style> ul { margin: 0; padding: 0; } li { padding-bottom: 10px; } </style>
<style> ul { margin: 0; padding: 0; list-style: none; } li { position: relative; padding-bottom: 10px; } li::after { content: ""; position: absolute; bottom: 0; left: 0; height: 10px; width: 100%; } </style>
粉丝
0
关注
0
收藏
0