Typography

list-style-position

用於控制列表中項目符號和數字位置的通用類別。

ClassStyles
list-inside
list-style-position: inside;
list-outside
list-style-position: outside;

範例(Examples)

基本範例(Basic example)

使用 list-insidelist-outside 等通用類別來控制列表中標記和文字縮排的位置:

list-inside

  • 5 cups chopped Porcini mushrooms
  • 1/2 cup of olive oil
  • 3lb of celery

list-outside

  • 5 cups chopped Porcini mushrooms
  • 1/2 cup of olive oil
  • 3lb of celery
<ul class="list-inside">  <li>5 cups chopped Porcini mushrooms</li>  <!-- ... --></ul><ul class="list-outside">  <li>5 cups chopped Porcini mushrooms</li>  <!-- ... --></ul>

響應式設計(Responsive design)

list-style-position 通用類別前面加上像 md: 這樣的中斷點變體,讓該通用類別只在中型螢幕尺寸及以上時套用:

<ul class="list-outside md:list-inside ...">  <!-- ... --></ul>

變體文件中了解更多關於使用變體的資訊。

Copyright © 2026 Tailwind Labs Inc.·商標政策(Brand)