li并排居中css
   
lan988 级别:管理员    + 关注TA 支持(0) | 反对(0)原内容


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Li Elements Centered and Side by Side</title>
<style>
  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
  }
  li {
    margin: 0 10px; /* 两侧间距 */
  }
</style>
</head>
<body>
 
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>
 
</body>
</html>
回到顶部顶端 回到底部底部