Properti varian font CSS
Contoh
Setel paragraf ke font huruf kecil:
p.small
{
font-variant: small-caps;
}
Definisi dan Penggunaan
Dalam font huruf kecil, semua huruf kecil diubah menjadi huruf besar. Namun, huruf besar yang dikonversi muncul dalam ukuran font yang lebih kecil daripada huruf besar asli dalam teks.
Properti font-variant
menentukan apakah teks harus ditampilkan dalam font huruf kecil atau tidak.
Nilai bawaan: | normal |
---|---|
Diwarisi: | Ya |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS1 |
Sintaks JavaScript: | objek .style.fontVariant="small-caps" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
font-variant | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaks CSS
font-variant: normal|small-caps|initial|inherit;
Nilai properti
Value | Description | Play it |
---|---|---|
normal | The browser displays a normal font. This is default | |
small-caps | The browser displays a small-caps font | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Halaman Terkait
Tutorial CSS: Font CSS
Referensi CSS: properti font
Referensi DOM HTML: properti fontVariant