Need an unordered list without any bullets
I have created an unordered list. I feel the bullets in the unordered list are bothersome, so I want to remove them.
Is it possible to have a list without bullets?
You can remove bullets by setting the list-style-type
to none
on the CSS for parent element (typically a <ul>
), for example:
ul {
list-style-type: none;
}
You might also want to add padding: 0
and margin: 0
to that, if you want to remove indentation as well.
See Listutorial for a great walkthrough of list formatting techniques.
If you're using Bootstrap, it has an "unstyled" class:
Remove the default list-style and left padding on list items (immediate children only).
Bootstrap 2:
<ul class="unstyled">
<li>...</li>
</ul>
http://twitter.github.io/bootstrap/base-css.html#typography
Bootstrap 3 and 4:
<ul class="list-unstyled">
<li>...</li>
</ul>
http://getbootstrap.com/css/#type-lists
你需要使用list-style: none;
<ul style="list-style: none;">
<li> ...</li>
</ul>
链接地址: http://www.djcxy.com/p/780.html
下一篇: 需要一个没有任何项目符号的无序列表