【发布时间】:2019-07-28 15:57:40
【问题描述】:
我的html代码是:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="general.css">
<link rel="stylesheet" type="text/css" href="common/basicDataTypes/list.css">
</head>
<body>
<div class="title"> title bar</div>
<p>option 1 -</p>
<ul class="ul-ident">
<li>
<p>test1:</p>
<ul class="ul-ident">
<li>
<p>subtest1</p>
</li>
<li>
<p>subtest2</p>
</li>
<li>
<p>subtest3</p>
</li>
<li>
<p>subtest4</p>
</li>
</ul>
</li>
<li>
<p>test2</p>
</li>
<li>
<p>test3</p>
</li>
<li>
<p>test4</p>
</li>
<li>
<p>test5</p>
</li>
</ul>
<p>option 2 - </p>
<ul class="ul-ident">
<li>
<p>test1</p>
</li>
<li>
<p>test2</p>
</li>
</ul>
<hr>
</body>
</html>
我的 CSS 样式是:
.title {
text-align: center;
font-weight: bold;
border-style: solid;
.ul-ident {
padding-left: 25px;
}
hr {
width: 90%;
border: none;
height: 3px;
/* Set the hr color */
color: green; /* old IE */
background-color: green; /* Modern Browsers */
}
我需要所有的项目符号都是圆盘样式,但主列表项是圆盘项目符号,子列表项目是圆形项目符号
我读到“默认情况下,列表项将标有项目符号(黑色小圆圈)”(来源:w3schools)
我尝试了 IE 和 chrome,两者都给出了相同的结果。
我的问题:如何使所有项目符号在同一个列表样式类型中?
【问题讨论】:
标签: css html-lists