Learn how to transform a basic list into a "list group" with CSS.
<ul>
<li>Adele</li>
<li>Agnes</li>
<li>Billy</li>
<li>Bob</li>
<li>Calvin</li>
<li>Christina</li>
<li>Cindy</li>
</ul>
ul {
list-style-type: none; /* Remove bullets */
padding: 0; /* Remove padding */
margin: 0; /* Remove margins */
}
ul li {
border: 1px solid #ddd; /* Add a thin border to each list item */
margin-top: -1px; /* Prevent double borders */
background-color: #f6f6f6; /* Add a grey background color */
padding: 12px; /* Add some padding */
}
Try it Yourself »
Tip: Go to our CSS List Tutorial to learn more about HTML lists and how to style them.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!