靠边的列表如果没有设置margin-left:20px,那么是看不到列表序号的。

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Document</title>
 6     <style>
 7         *{
 8             padding: 0;
 9             margin: 0;
10             /* list-style: none; */
11         }
12         .container {
13             background: #eee;
14         }
15         ol{
16             margin-left: 20px;/* 这里如果不设置左边距,默认是看不到有序列表编号 */
17             /* list-style: lower-roman url('images/2.jpg') inside; */
18             /* list-style: lower-alpha url('images/2.jpg') outside; */
19             /* list-style: lower-alpha; */
20         }
21     </style>
22 </head>
23 <body>
24     <div class="container">
25         <ol>
26             <li>1111</li>
27             <li>22222</li>
28             <li>3333</li>
29             <li>44444</li>
30             <li>55555</li>
31         </ol>
32     </div>
33 </body>
34 </html>
原文地址:https://www.cnblogs.com/Knowledge-is-infinite/p/11266737.html