我正在尝试显示一个无序列表,如下所示:
<p style="margin-top:1em; line-height: 1.4;">Dear John,</p>
<p style="margin-top:1em; line-height: 1.4;">Here's the list of items to collect:</p>
<p style="margin-top:1em; line-height: 1.4;"></p>
<ul>
<li>Item 1 - Apples</li>
<li>Item 2 - Bananas</li>
</ul>
它看起来像这样:
如果我将其更改为有序列表,它将如下所示:
我不能让无序列表以与有序列表相同的方式缩进。下面是CSS的相关部分:
html, body, h1, h2, h3, h4, h5, h6, p, ul, li{
margin: 0;
padding: 0;
}
body{
font-family: 'Myriad Set', 'Myriad Pro', 'Myriad', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
-webkit-font-smoothing: antialiased;
max-width: 775px;
margin: 0 auto;
padding: 1.25em 0 0;
font-size: 12pt;
background-color: #fff;
color: #000;
}
https://stackoverflow.com/questions/56763540
复制相似问题