由于某些原因,当我显式地将display设置为list-item,list-style-type设置为square (disc也不起作用)时,我无法使用标记显示项目符号
CSS:
#page1 dd
{
display: list-item;
list-style-type: square;
}HTML:
<dl>
<dt>How does the game work? </dt>
<dd>It provides a process - a way to ask questions and find consensus-building answers through an interactive, web-based simulation.</dd>
<dd>It creates a common language for discussing issues. </dd>
<dd>It moves the conversation from an individual view to a systemic one. </dd>
</dl>这是它在浏览器中的样子。任何可能干扰代码的想法-在firebug中,它显示它正在正确应用,但效果不可见。

发布于 2011-12-28 04:43:09
你只需要为子弹的出现留出一些余地:
http://jsfiddle.net/BPMWP/2/
dd {
display: list-item;
list-style-type: square;
margin-left:20px;
}display:list-item属性没有ul或ol所具有的默认css,因此它会隐藏项目符号,除非您明确地缩进项目符号。
这实际上是一个巨大的痛苦去弄清楚。检查元素here为我解决了这个问题。问得好!
https://stackoverflow.com/questions/8648891
复制相似问题