douwen1006 2016-05-15 16:49
浏览 11
已采纳

雨果目录在前面加了点

I am using Hugo static site generator to create a website. I am using this code snippet, as given in docs to create TOC:

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

This is the generated code:

<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>

Due to this I am getting a extra bullet. can anyone solve this? or can you suggest CSS to remove bullets just from the first ul.

  • 写回答

2条回答 默认 最新

  • doubi2014 2016-05-15 16:54
    关注

    Use following css:

    #toc ul { 
      list-style-type: none; 
    }
    
    #toc ul ul { 
      list-style-type: disc; 
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图