使用 CSS 設定標記與該標記相關文字之間的距離


marker-offset 屬性允許你指定標記與該標記相關文字之間的距離。

示例

 可以嘗試執行以下程式碼來實現 marker-offset 屬性

<html>
   <head>
   </head>
   <body>
      <ul style = "list-style: inside square; marker-offset:3em;">
         <li>UK</li>
         <li>US</li>
      </ul>
      <ol style = "list-style: outside upper-alpha; marker-offset:3cm;">
         <li>UK</li>
         <li>US</li>
      </ol>
   </body>
</html>

更新於: 2020 年 2 月 3 日

263 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.