加背景图啊其实想要这种效果何必去自己写呢,网上现在各种插件,完全可以用ztree来模拟
ul加个before伪类样式,弄个border-left. 。 然后每个li也设置一个伪类before,样式也写个border-left . 就行啦~
ul
before
border-left
li