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;

示例(Examples)

¥Examples

基本示例(Basic example)

¥Basic example

使用 decoration-dotteddecoration-dashed 等工具更改元素的 文本修饰 样式:

¥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)

¥Responsive design

text-decoration-style 工具前面使用断点变体如 md: 仅在 medium 屏幕尺寸及以上时应用工具:

<p class="underline md:decoration-dashed ...">
<!-- ... -->
</p>

请参阅 变体文档 详细了解如何使用变体。

TailwindCSS v4.0 中文网 - 粤ICP备13048890号