gpt4 book ai didi

css - 雨果目录前面有额外的点

转载 作者:IT王子 更新时间:2023-10-29 00:42:05 25 4
gpt4 key购买 nike

我正在使用 Hugo 静态网站生成器来创建网站。我正在使用这个代码片段,如文档中给出的那样来创建目录:

<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>

这是生成的代码:

<div id="toc" class="well col-md-4 col-sm-6">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#step-1-install-hugo:c57cc0038c788519b441e0331c8bebc7">Step 1. Install Hugo</a></li>
<li><a href="#step-2-build-the-docs:c57cc0038c788519b441e0331c8bebc7">Step 2. Build the Docs</a></li>
<li><a href="#step-3-change-the-docs-site:c57cc0038c788519b441e0331c8bebc7">Step 3. Change the docs site</a></li>
<li><a href="#step-4-have-fun:c57cc0038c788519b441e0331c8bebc7">Step 4. Have fun</a></li>
</ul>
</li>
</ul>
</nav>
</div>

因此,我得到了一颗额外的子弹。谁能解决这个问题?或者您可以建议 CSS 仅从第一个 ul 中删除元素符号。

最佳答案

使用以下 CSS:

#toc ul { 
list-style-type: none;
}

#toc ul ul {
list-style-type: disc;
}

关于css - 雨果目录前面有额外的点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37241028/

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