字体
用于控制文本大小写的工具类。
| Class | Styles |
|---|---|
uppercase | text-transform: uppercase; |
lowercase | text-transform: lowercase; |
capitalize | text-transform: capitalize; |
normal-case | text-transform: none; |
使用 uppercase 工具类将元素的文本转换为大写:
The quick brown fox jumps over the lazy dog.
<p class="uppercase">The quick brown fox ...</p>使用 lowercase 工具类将元素的文本转换为小写:
The quick brown fox jumps over the lazy dog.
<p class="lowercase">The quick brown fox ...</p>使用 capitalize 工具类将元素的文本首字母大写:
The quick brown fox jumps over the lazy dog.
<p class="capitalize">The quick brown fox ...</p>使用 normal-case 工具类保持元素的原始文本大小写—通常用于在不同断点重置大小写:
The quick brown fox jumps over the lazy dog.
<p class="normal-case">The quick brown fox ...</p>Prefix a text-transform utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:
<p class="capitalize md:uppercase ..."> Lorem ipsum dolor sit amet...</p>Learn more about using variants in the variants documentation.