HTML DOM fontStretch Property
Complete Style Object Reference
Definition and Usage
The fontStretch property is used to condense or stretch the current font.
Syntax
Object.style.fontStretch=value
|
Possible Values
Value |
Description |
ultra-condensed
extra-condensed
condensed
semi-condensed
normal
semi-expanded
expanded
extra-expanded
ultra-expanded |
Sets the condensation/expansion. "ultra-condensed" is the most condensed (narrowest) value,
and "ultra-expanded" is the most expanded (widest) value
|
wider |
Sets the scale of expansion to the next value
|
narrower |
Sets the scale of condensation to the next
value
|
Example
The following example stretches the font:
<html>
<head>
<script type="text/javascript">
function setFontStretch()
{
document.getElementById("p1").style.fontStretch="ultra-expanded";
}
</script>
</head>
<body>
<p id="p1">This is an example paragraph.</p>
<input type="button" onclick="setFontStretch()"
value="Stretch font" />
</body>
</html>
|
Try-It-Yourself Demos
fontStretch - Stretch a font
Complete Style Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|