font

英[f?nt] 美[fɑ:nt]

n. フォント; フォント; 洗禮堂 (教會(huì)內(nèi)にあり、多くの場合石でできています) ; (同じフォントとサイズ) 一連の書體

複數(shù)形: fonts

variant

英[?ve?ri?nt] 美[?veri?nt]

n. (単語など)variant, (character sound) transliteration; [生]variant,variant;変形,variable,transformation; [統(tǒng)一]variant

adj. variation ; 異なる、異なる、一貫性のない、多様な、可変、不確定な

複數(shù)形: 異形

JavaScriptのfontVariantプロパティ 構(gòu)文

関數(shù):テキストを表示するための小大文字のフォントを設(shè)定します

構(gòu)文: 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>

インスタンスの実行 ?

[インスタンスの実行] ボタンをクリックしてオンライン インスタンスを表示します