fontSizeAdjust Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:fontSizeAdjust

Description

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

Value Description
noneDefault 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.

Technical Details

Item Value
Default Value: none
Return Value: A String, representing the font aspect value of a text
CSS VersionCSS3

Example

Adjust font size:

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials