使用 CSS 建立帶藍色左邊的列表


若要在 CSS 中為列表新增一條藍色左邊框,可以嘗試執行以下程式碼,即:

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         ul {
            border-left: 3px solid blue;
            background-color: #gray;
         }
      </style>
   </head>
   <body>
      <p>Countries</p>
      <ul>
         <li>India</li>
         <li>US</li>
         <li>Australia</li>
      </ul>
   </body>
</html>

輸出

更新時間: 22-Jun-2020

153 次瀏覽

開啟你的 職業生涯

完成課程即可取得認證

立即開始
廣告
© . All rights reserved.