Stil fontSizeAdjust Özellik
Örnek
Yazı tipi boyutunu ayarlayın:
document.getElementById("demo").style.fontSizeAdjust = "0.58";
Tanım ve Kullanım
fontSizeAdjust özelliği, bir metnin yazı tipi en boy değerini ayarlar veya döndürür.
Tüm yazı tiplerinin , küçük harf "x" ile büyük harf "X" arasındaki boyut farkı olan bir en boy değeri vardır.
fontSizeAdjust özelliği, ilk tercih edilen yazı tipi mevcut olmadığında yazı tipi boyutunu daha iyi kontrol etmenizi sağlar. Bir yazı tipi mevcut olmadığında, tarayıcı belirtilen ikinci yazı tipini kullanır. Bu, yazı tipi boyutunda büyük bir değişikliğe neden olabilir. Bunu önlemek için bu özelliği kullanın.
Tarayıcı, birinci seçenek yazı tipi için en boy değerini bildiğinde, tarayıcı ikinci seçenek yazı tipiyle metin görüntülerken hangi yazı tipi boyutunun kullanılacağını anlayabilir.
Tarayıcı Desteği
Property | |||||
---|---|---|---|---|---|
fontSizeAdjust | Not supported | Not supported | Yes | Not supported | Not supported |
Sözdizimi
fontSizeAdjust özelliğini döndürün:
object.style.fontSizeAdjust
fontSizeAdjust özelliğini ayarlayın:
object.style.fontSizeAdjust = "none|number|initial|inherit"
Value | Description |
---|---|
none | Default value. No font size adjustment |
number | Preserve the first-choice font's x-height, and calculate the aspect value ratio for the font. The formula that is used: font-size of first-choice font*(aspect value of first-choice font/aspect value of available font)=font-size to use on available font Example: If 14px Verdana (aspect value of 0.58) was unavailable, but the available font, Times New Roman, has an aspect value of 0.46, the adjusted font-size to use would be 14*(0.58/0.46) = 17.65px. |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Teknik detaylar
Varsayılan değer: | Yok |
---|---|
Geri dönüş değeri: | Bir metnin yazı tipi en boy değerini temsil eden bir Dize |
CSS Sürümü | CSS3 |
İlgili Sayfalar
CSS eğitimi: CSS Yazı Tipi
CSS referansı: yazı tipi boyutu özelliği
HTML DOM referansı: yazı tipi özelliği
❮ Stil Nesnesi