字体
用于控制单词如何连字符化的工具类。
Class | Styles |
---|---|
hyphens-none | hyphens: none; |
hyphens-manual | hyphens: manual; |
hyphens-auto | hyphens: auto; |
使用 hyphens-none
工具类来防止单词被连字符化,即使使用了换行建议 ­
:
Officially recognized by the Duden dictionary as the longest word in German, Kraftfahrzeughaftpflichtversicherung is a 36 letter word for motor vehicle liability insurance.
<p class="hyphens-none"> ... Kraftfahrzeug­haftpflichtversicherung is a ...</p>
使用 hyphens-manual
工具类来仅在使用换行建议 ­
的地方设置连字符化点:
Officially recognized by the Duden dictionary as the longest word in German, Kraftfahrzeughaftpflichtversicherung is a 36 letter word for motor vehicle liability insurance.
<p class="hyphens-manual"> ... Kraftfahrzeug­haftpflichtversicherung is a ...</p>
这是默认的浏览器行为。
使用 hyphens-auto
工具类来允许浏览器根据语言自动选择连字符化点:
Officially recognized by the Duden dictionary as the longest word in German, Kraftfahrzeughaftpflichtversicherung is a 36 letter word for motor vehicle liability insurance.
<p class="hyphens-auto" lang="de"> ... Kraftfahrzeughaftpflichtversicherung is a ...</p>
换行建议 ­
将优先于自动连字符化点。
Prefix a hyphens
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<p class="hyphens-none md:hyphens-auto ..."> Lorem ipsum dolor sit amet...</p>
Learn more about using variants in the variants documentation.