是否可以填写<UL>
用线(或点或其他)缩进?
HTML
<ul>Foo
<ul>Bar
<ul>Foo
</ul>
</ul>
</ul>
结果
Foo
-----Bar
----------Foo
最佳答案
这不是一个通用的解决方案,但却是一个速战速决的解决方案:
HTML:
<ul>Foo
<ul>Bar
<ul>Foo
</ul>
</ul>
</ul>
CSS:
ul {
margin: 0;
padding: 0;
}
ul > ul:before {
content: "------";
}
ul > ul > ul:before {
content: "------------";
}
亲 body 验 jsFiddle !
关于html - 用行填充 <UL> 缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15269371/