Javascript Reference - HTML DOM Style fontSizeAdjust Property








The fontSizeAdjust property sets or gets the font aspect value of a text.

Browser Support

fontSizeAdjust No No Yes No No

Syntax

Return the fontSizeAdjust property:

var v = object.style.fontSizeAdjust 

Set the fontSizeAdjust property:

object.style.fontSizeAdjust='none|number|initial|inherit

Property Value

number
the aspect value
none
Default value. No adjustment to the font size
initial
sets to default value
inherit
Inherits this property from its parent element




Technical Details

Default Value: none
Return Value: A string representing the font aspect value
CSS Version CSS3

Example

The following code shows how to adjust font size.


<!DOCTYPE html>
<html>
<body>
<p id="myP">This is a paragraph.</p>
<button type="button" onclick="myFunction()">test</button>
<!--from w  w  w .  j a va 2 s  . co  m-->
<script>
function myFunction() {
    document.getElementById("myP").style.fontSizeAdjust = "0.58";
}
</script>

</body>
</html>

The code above is rendered as follows: