| Class | Styles |
|---|---|
| .lh-1 | line-height: 1; |
| .lh-sm | line-height: var(--bs-line-height-sm); |
| .lh-md | line-height: var(--bs-line-height-md); |
| .lh-lg | line-height: var(--bs-line-height-lg); |
行高
使用 .lh-* 工具类更改行高。
This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.
This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.
This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.
This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.
<p class="lh-1">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p>
<p class="lh-sm">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p>
<p class="lh-md">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p>
<p class="lh-lg">This is a long paragraph written to show how the line-height of an element is affected by our utilities. Classes are applied to the element itself or sometimes the parent element. These classes can be customized as needed with our utility API.</p>CSS
Sass 工具类 API
行高工具类在我们的工具类 API 中于 scss/_utilities.scss 内声明。了解如何使用工具类 API。
"line-height": (
property: line-height,
class: lh,
values: (
1: 1,
sm: var(--line-height-sm),
md: var(--line-height-md),
lg: var(--line-height-lg),
)
),