Set hyphenate-character:
<style>
div.a {
hyphenate-character: auto;
}
div.b {
hyphenate-character: "=";
}
</style>
<body>
<div class="a">A veryvery­very long word.</div>
<div class="b">A veryvery­very long word.</div>
</body>
Try it Yourself »
The hyphenate-character
property defines the character used at the end of line, before a hyphenation break.
Default value: | auto |
---|---|
Inherited: | yes |
Animatable: | no. Read about animatable |
Version: | CSS4 |
JavaScript syntax: | object.style.hyphenateCharacter="/" |
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
hyphenate-character | 106.0 | 106.0 | 98.0 | 17.0 | 92.0 |
hyphenate-character: auto|
string|initial|inherit;
Value | Description | Demo |
---|---|---|
auto | Default. The browser selects an appropriate character based on the current typographic conventions | Demo ❯ |
string | The character used at the end of line, before a hyphenation break | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!