HTML DOM fontStretch ÊôÐÔ
¶¨ÒåºÍÓ÷¨
fontStretch ÊôÐÔÓÃÓÚ¶Ôµ±Ç°µÄ font-family ½øÐÐÉìËõ±äÐΡ£
Óï·¨£º
Object.style.fontStretch=value
¿ÉÄܵÄÖµ
Öµ | ÃèÊö |
---|---|
normal | ĬÈÏÖµ¡£°ÑËõ·Å±ÈÀýÉèÖÃΪ±ê×¼¡£ |
wider | °ÑÉìÕ¹±ÈÀýÉèÖÃΪ¸ü½øÒ»²½µÄÉìÕ¹Öµ |
narrower | °ÑÊÕËõ±ÈÀýÉèÖÃΪ¸ü½øÒ»²½µÄÊÕËõÖµ |
|
ÉèÖà font-family µÄËõ·Å±ÈÀý¡£ "ultra-condensed" ÊÇ×î¿íµÄÖµ£¬¶ø "ultra-expanded" ÊÇ×îÕµÄÖµ¡£ |
ʵÀý
±¾Àý¶Ô×ÖÌå½øÐÐÉìÕ¹£º
<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>