排版
控制文本装饰的实用工具。
Class | Styles |
---|---|
underline | text-decoration-line: underline; |
overline | text-decoration-line: overline; |
line-through | text-decoration-line: line-through; |
no-underline | text-decoration-line: none; |
使用 underline
实用工具为元素的文本添加下划线:
敏捷的棕色狐狸跳过懒惰的狗。
<p class="underline">敏捷的棕色狐狸...</p>
使用 overline
实用工具为元素的文本添加上划线:
敏捷的棕色狐狸跳过懒惰的狗。
<p class="overline">敏捷的棕色狐狸...</p>
使用 line-through
实用工具为元素的文本添加删除线:
敏捷的棕色狐狸跳过懒惰的狗。
<p class="line-through">敏捷的棕色狐狸...</p>
使用 no-underline
实用工具从元素的文本中移除线:
敏捷的棕色狐狸跳过懒惰的狗。
<p class="no-underline">敏捷的棕色狐狸...</p>
Prefix a text-decoration-line
utility with a variant like hover:*
to only apply the utility in that state:
将鼠标悬停在文本上以查看预期效果
<p>敏捷的 <a href="..." class="no-underline hover:underline ...">棕色狐狸</a> 跳过懒惰的狗。</p>
Learn more about using variants in the variants documentation.
Prefix a text-decoration-line
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<a class="no-underline md:underline ..." href="..."> <!-- ... --></a>
Learn more about using variants in the variants documentation.