Javascript examples for CSS Style Property:fontSizeAdjust
The fontSizeAdjust property sets or gets the font aspect value of a text.
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. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | none |
Return Value: | A String, representing the font aspect value of a text |
CSS Version | CSS3 |
Adjust font size:
<!DOCTYPE html> <html> <body> <p id="myP">This is a paragraph.</p> <button type="button" onclick="myFunction()">Adjust font size</button> <script> function myFunction() {//from w w w .j av a 2 s. c o m document.getElementById("myP").style.fontSizeAdjust = "0.58"; } </script> </body> </html>