gpt4 book ai didi

html - 如何消除无序列表中每个列表项之间的差距?

转载 作者:太空宇宙 更新时间:2023-11-04 00:19:03 25 4
gpt4 key购买 nike

每当我创建无序列表时,每个列表项下方都会留有空隙。

我该怎么做才能删除它?

已经试过了边距:0 padding : 0ulli 上。

的 CSS 重置

*{ margin : 0; padding: 0 }

似乎也不起作用。

在水平列表的情况下通常可以删除间隙。但是当我想要一个垂直列表时,我不知道如何实现这一点。

最佳答案

@j08691 @developdaly : I've placed images within each of the <li>. Could that be the problem ? – maxxon15 6 mins ago

是的。是的,它可以。

添加此 CSS 以消除间隙:

img {
vertical-align: top;
}

间隙不低于每个 li , 它们在每个 img 下方.

关于html - 如何消除无序列表中每个列表项之间的差距?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10058222/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com