| 类名 | 样式 |
|---|---|
| .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-*工具更改行高。
这是一个很长的段落,用于展示我们的工具类如何影响元素的行高。类可以应用于元素本身,有时也应用于父元素。这些类可以根据需要通过我们的工具类 API 进行自定义。
这是一个很长的段落,用于展示我们的工具类如何影响元素的行高。类可以应用于元素本身,有时也应用于父元素。这些类可以根据需要通过我们的工具类 API 进行自定义。
这是一个很长的段落,用于展示我们的工具类如何影响元素的行高。类可以应用于元素本身,有时也应用于父元素。这些类可以根据需要通过我们的工具类 API 进行自定义。
这是一个很长的段落,用于展示我们的工具类如何影响元素的行高。类可以应用于元素本身,有时也应用于父元素。这些类可以根据需要通过我们的工具类 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),
)
),