1. 排版
  2. text-decoration-style

排版

text-decoration-style

用于控制文本装饰样式的实用工具。

类名样式
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;

示例

基本示例

使用 decoration-dotteddecoration-dashed 等实用类来更改元素的文本装饰样式

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>

响应式设计

前缀a text-decoration-style 实用工具类 使用断点变体 (如 md:) 以仅在中等 屏幕尺寸及以上尺寸应用该实用工具类

<p class="underline md:decoration-dashed ...">
Lorem ipsum dolor sit amet...
</p>

变体文档中了解有关使用变体的更多信息。

版权所有 © 2025 Tailwind Labs Inc.·商标政策