很抱歉提出这么简单的问题,但我已经陷入困境,而现有的答案对我来说并不适用。我把它归结为列表中最简单的情况,但是我无法显示边框。
html,
body,
h1,
h2,
h3,
p,
ol,
ul,
li,
a {
padding: 0;
border: 0;
margin: 0;
font-size: 100%;
font: inherit;
}
/* feed styling */
.feed ul {
list-style-type: none;
text-align: left;
}
.feed ul li {
border: 10px single black;
list-style-position: inside;
}

<body>
<div class="feed">
<ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ul>
</div>
</body>
&#13;
答案 0 :(得分:4)
不正确。border: 10px single black;
使用border: 10px solid black;
html,
body,
h1,
h2,
h3,
p,
ol,
ul,
li,
a {
padding: 0;
border: 0;
margin: 0;
font-size: 100%;
font: inherit;
}
.feed ul {
list-style-type: none;
text-align: left;
}
.feed ul li {
border: 10px solid black;
margin: 5px 0px;
list-style-position: inside;
}
<div class="feed">
<ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ul>
</div>