gpt4 book ai didi

css - 删除 条目之间的垂直空间

转载 作者:行者123 更新时间:2023-11-28 11:06:02 25 4
gpt4 key购买 nike

我搜索了 stackoverflow 并没有发布任何类似的问题。如果我错过了一个,我深表歉意。

我正在 RStudio 中创建一个 R 演示文稿。我想删除“预处理”和列表项之间的垂直空间。我找不到解决方案。我还想删除列表项之间的垂直空间。请参阅下面的代码和屏幕截图:

<style>
.reveal p {font-size: 35px;}
.reveal ul,
.reveal li,
.reveal ol {
font-size: 20px;
padding: 0px 0px 0px;
margin-bottom: 0px;
}
.reveal li:after,
.reveal li:before {
height: 0px; // or px or em or whatever
width: 0px; // or whatever space you want
}
span {
display: inline-block;
}
span.mypara2 {
color: blue;
font-size: 30px;
}
</style>


First Slide
========================================================

<span class="mypara2">Preprocessing</span>
<ol>
<li>List1</li>
<li>List2</li>
<li>List3</li>
</ol>

enter image description here

更新:

这是我根据@phil 进行更改后的屏幕截图。

enter image description here

最佳答案

您必须设置 <ol> 的上边距元素归零:

<ol style="margin-top: 0;">
<li>List1</li>
<li>List2</li>
<li>List3</li>
</ol>

当然,也可以使用您的样式表来完成此操作,这在大多数情况下更可取。

关于css - 删除 <span> 和 <list> 条目之间的垂直空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34842906/

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