Typography

text-transform

Utilities for controlling the capitalization of text.

ClassStyles
uppercase
text-transform: uppercase;
lowercase
text-transform: lowercase;
capitalize
text-transform: capitalize;
normal-case
text-transform: none;

Examples

Uppercasing text

Use the uppercase utility to uppercase the text of an element:

The quick brown fox jumps over the lazy dog.

<p class="uppercase">The quick brown fox ...</p>

Lowercasing text

Use the lowercase utility to lowercase the text of an element:

The quick brown fox jumps over the lazy dog.

<p class="lowercase">The quick brown fox ...</p>

Capitalizing text

Use the capitalize utility to capitalize text of an element:

The quick brown fox jumps over the lazy dog.

<p class="capitalize">The quick brown fox ...</p>

Resetting text casing

Use the normal-case utility to preserve the original text casing of an element—typically used to reset capitalization at different breakpoints:

The quick brown fox jumps over the lazy dog.

<p class="normal-case">The quick brown fox ...</p>

Responsive design

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 ...">  <!-- ... --></p>

Learn more about using variants in the variants documentation.

Copyright © 2025 Tailwind Labs Inc.·Trademark Policy

Tailwind CSS 中文网(本网站)的目标是为中文开发者提供准确、及时的 Tailwind CSS 中文文档

Tailwind CSS 中文文档由本网站维护人员共同翻译,采用 MIT 开源协议发布

本网站与 tailwindcss.com 及 Tailwind Labs Inc. 并无从属关系

Tailwind 商标由 Tailwind Labs Inc. 所有

京ICP备15031610号-8