我创建了一个无序列表。我觉得无序列表中的子弹很麻烦,所以我想删除它们。
是否有可能没有子弹的列表?
我创建了一个无序列表。我觉得无序列表中的子弹很麻烦,所以我想删除它们。
是否有可能没有子弹的列表?
您可以通过设置删除项目符号 list-style-type
至 none
关于父元素的CSS(通常是一个 <ul>
), 例如:
ul {
list-style-type: none;
}
您可能还想添加 padding: 0
和 margin: 0
对此,如果你想删除缩进。
看到 Listutorial 有关列表格式化技术的精彩演练。
您可以通过设置删除项目符号 list-style-type
至 none
关于父元素的CSS(通常是一个 <ul>
), 例如:
ul {
list-style-type: none;
}
您可能还想添加 padding: 0
和 margin: 0
对此,如果你想删除缩进。
看到 Listutorial 有关列表格式化技术的精彩演练。
如果你正在使用Bootstrap,它有一个“没有样式”的类:
删除列表项上的默认列表样式和左边距(仅限直接子项)。
<ul class="unstyled">
<li>...</li>
</ul>
http://twitter.github.io/bootstrap/base-css.html#typography
<ul class="list-unstyled">
<li>...</li>
</ul>
你需要使用 list-style: none;
<ul style="list-style: none;">
<li> ...</li>
</ul>
在css,风格,
list-style-type: none;
你必须添加一个样式 <ul>
元素如下:
<ul style="list-style: none; ">
<li>Item</li>
...
<li>Item</li>
</ul>
这将删除子弹。您还可以在样式表中添加CSS,如上例所示。
在css ...
ul {
list-style:none;
}
对上述内容的细化:如果更长的线条溢出到其他屏幕线,则使更长的线条更具可读性:
ul, li {list-style-type: none;}
li {padding-left: 2em; text-indent: -2em;}
使用以下CSS:
ul {
list-style-type: none
}
本机:
ul { list-style-type: none; }
引导:
<ul class="list-unstyled list-group">
<li class="list-group-item">...</li>
</ul>
注意: 如果您正在使用列表组,那么就不需要列表 - 无样式。