語法

行數限制line-clamp

Limiting the contents of a container to the specified number of lines.

Overview

ClassDeclarations
lines:valuedisplay: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: value; overflow: hidden; overflow-wrap: break-word; text-overflow: ellipsis;

Conditionally apply

Apply styles based on different states using selectors and applying conditionally.

<div class="lines:1:hover lines:1@sm lines:1@dark lines:1@print">…</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy