font
英 [f?nt]? ?美 [fɑ:nt]??
n.字體;字形;圣洗池(設(shè)于教堂中,常為石造);(同樣字體和字號(hào)的)一副鉛字
復(fù)數(shù): fonts
variant
英 [?ve?ri?nt]? ?美 [?veri?nt]??
n.(詞等的)變體,(字音的)轉(zhuǎn)訛;[生]變種,變異體;變形,變量,轉(zhuǎn)化;[統(tǒng)]變式
adj.變異的;不同的,相異的,不一致的;多樣的;易變的,不定的
復(fù)數(shù): variants
javascript fontVariant屬性 語(yǔ)法
作用:設(shè)置小型大寫字母的字體顯示文本
語(yǔ)法:Object.style.fontVariant=normal|small-caps
javascript fontVariant屬性 示例
<html> <head> <script type="text/javascript"> function setSmallCaps() { document.getElementById("p1").style.fontVariant="small-caps"; } </script> </head> <body> <p id="p1">This is an example paragraph.</p> <p>This is another example paragraph.</p> <input type="button" onclick="setSmallCaps()" value="Display small-caps font" /> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例