1. Typography
  2. text-decoration-style

Typography

text-decoration-style

Utilities for controlling the style of text decorations.

ClassStyles
decoration-solid
text-decoration-style: solid;
decoration-double
text-decoration-style: double;
decoration-dotted
text-decoration-style: dotted;
decoration-dashed
text-decoration-style: dashed;
decoration-wavy
text-decoration-style: wavy;

Examples

Basic example

Use utilities like decoration-dotted and decoration-dashed to change the text decoration style of an element:

decoration-solid

The quick brown fox jumps over the lazy dog.

decoration-double

The quick brown fox jumps over the lazy dog.

decoration-dotted

The quick brown fox jumps over the lazy dog.

decoration-dashed

The quick brown fox jumps over the lazy dog.

decoration-wavy

The quick brown fox jumps over the lazy dog.

<p class="underline decoration-solid">The quick brown fox...</p><p class="underline decoration-double">The quick brown fox...</p><p class="underline decoration-dotted">The quick brown fox...</p><p class="underline decoration-dashed">The quick brown fox...</p><p class="underline decoration-wavy">The quick brown fox...</p>

Responsive design

Prefix a text-decoration-style utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:

<p class="underline md:decoration-dashed ...">  <!-- ... --></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