没有为这是一个非常方便的指南。这里是小提琴:
HTML:
- Animals
- Birds
- Mammals
- Elephant
- Mouse
- Reptiles
CSS:
ul.tree, ul.tree ul { list-style-type: none; background: #fff url(http://odyniec.net/articles/turning-lists-into-trees/vline.png) repeat-y; margin: 0; padding: 0; } ul.tree ul { margin-left: 10px; } ul.tree li { margin: 0; padding: 0 12px; line-height: 20px; background: url(http://odyniec.net/articles/turning-lists-into-trees/node.png) no-repeat; color: #369; font-weight: bold; } ul.tree li.last {
background: #fff url(http://odyniec.net/articles/turning-lists-into-trees/lastnode.png) no-repeat;
}
来源: