Properti tanda hubung CSS
Contoh
Setel tanda hubung yang berbeda:
div.a {
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
div.b {
-webkit-hyphens: manual;
-ms-hyphens:
manual;
hyphens: manual;
}
div.c {
-webkit-hyphens:
auto;
-ms-hyphens: auto;
hyphens: auto;
}
Definisi dan Penggunaan
Properti hyphens
menentukan apakah tanda hubung diizinkan untuk membuat lebih banyak peluang pembungkusan lunak dalam satu baris teks.
Nilai bawaan: | panduan |
---|---|
Diwarisi: | Ya |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.hyphens="none" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
hyphens | 55.0 | 79.0 10.0 -ms- |
43.0 | 5.1 -webkit- | 44.0 |
Sintaks CSS
hyphens: none|manual|auto|initial|inherit;
Nilai properti
Value | Description |
---|---|
none | Words are not hyphenated |
manual | Default. Words are only hyphenated at ‐ or ­ (if needed) |
auto | Words are hyphenated where the algorithm is deciding (if needed) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |