Properti pengaturan-fitur-font CSS
Contoh
Tentukan pengaturan-fitur-font:
/* enable small-caps */
.ex1 { font-feature-settings: "smcp" on; }
/* convert both upper and lowercase to small caps */
.ex2 {
font-feature-settings: "c2sc", "smcp"; }
/* no common ligatures */
.ex3 { font-feature-settings: "liga" 0; }
/* enable automatic
fractions */
.ex4 { font-feature-settings: "frac"; }
Definisi dan Penggunaan
Properti font-feature-settings
ini memungkinkan kontrol atas fitur tipografi lanjutan dalam font OpenType.
Nilai bawaan: | normal |
---|---|
Diwarisi: | Ya |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.fontFeatureSettings="normal" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Angka yang diikuti oleh -webkit- atau -moz- menentukan versi pertama yang berfungsi dengan awalan.
Property | |||||
---|---|---|---|---|---|
font-feature-settings | 48.0 16.0 -webkit- |
10.0 | 34.0 15.0 -moz- |
9.1 | 35.0 15.0 -webkit- |
Sintaks CSS
font-feature-settings: normal|feature-value;
Nilai properti
Value | Description |
---|---|
normal | Default. Use the default settings to lay out text |
feature-value | Format: string [1|0|on|off] Always a string of 4 ASCII characters. |