Thuộc tính ký tự gạch nối CSS
Ví dụ
Đặt ký tự gạch nối:
<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>
Hãy tự mình thử »Định nghĩa và cách sử dụng
Thuộc tính hyphenate-character
xác định ký tự được sử dụng ở cuối dòng, trước dấu gạch nối.
Giá trị mặc định: | tự động |
---|---|
Thừa hưởng: | Đúng |
Hoạt hình: | KHÔNG. Đọc về hoạt hình |
Phiên bản: | CSS4 |
Cú pháp JavaScript: | đối tượng .style.hyphenateCharacter="/" |
Hỗ trợ trình duyệt
Các số trong bảng chỉ định phiên bản trình duyệt đầu tiên hỗ trợ đầy đủ thuộc tính.
Property | |||||
---|---|---|---|---|---|
hyphenate-character | 106.0 | 106.0 | 98.0 | 17.0 | 92.0 |
Cú pháp CSS
hyphenate-character: auto| string |initial|inherit;
Giá trị tài sản
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 |