fontStretch 屬性用于對(duì)當(dāng)前的 font-family 進(jìn)行伸縮變形。
Object.style.fontStretch=value
值 | 描述 |
---|---|
normal | 默認(rèn)值。把縮放比例設(shè)置為標(biāo)準(zhǔn)。 |
wider | 把伸展比例設(shè)置為更進(jìn)一步的伸展值 |
narrower | 把收縮比例設(shè)置為更進(jìn)一步的收縮值 |
|
設(shè)置 font-family 的縮放比例。 "ultra-condensed" 是最寬的值,而 "ultra-expanded" 是最窄的值。 |
本例對(duì)字體進(jìn)行伸展:
<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>
如對(duì)本文有疑問,請(qǐng)?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會(huì)為你解答?。?點(diǎn)擊進(jìn)入論壇
Powered by 365建站網(wǎng) RSS地圖 HTML地圖
copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號(hào)