方案1
<link rel="stylesheet" href="https://www.guofei.site/public/css/litree.css">
<ul class="litree">
<li>
<div class="sticky">Python</div>
<ul>
<li>
<div class="sticky">numpy</div>
<ul>
<li>
<div>快速的矩阵计算</div>
</li>
<li>
<div>多种科学计算和算法</div>
</li>
</ul>
</li>
<li>
<div class="sticky">scikit-learn</div>
<ul>
<li>
<div>机器学习</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
方案2:基于markdown
方法:用 javascript 寻找 ul 和 li,添加各自的 class
不直接放在博客页面,因为
- (已解决)会把侧边栏污染
- (无法解决)单个页面中既有列表,又有 mindmap,无法定位到 mindmap
例子:
- 例子:https://www.guofei.site/mindmap/mind1.html
- js: https://www.guofei.site/public/mindmap/mindmap.js
- css:https://www.guofei.site/public/mindmap/mindmap.css