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 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在