The fontSizeAdjust
property sets or gets the font aspect value of a text.
fontSizeAdjust |
No | No | Yes | No | No |
Return the fontSizeAdjust property:
var v = object.style.fontSizeAdjust
Set the fontSizeAdjust property:
object.style.fontSizeAdjust='none|number|initial|inherit
Default Value: | none |
---|---|
Return Value: | A string representing the font aspect value |
CSS Version | CSS3 |
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: