英 ['letəspeɪsɪŋ] 美 ['letəspeɪsɪŋ]
n.字间隔空
javascript letterSpacing属性 语法
作用:设置字符之间的空白。
语法:Object.style.letterSpacing=normal|length
javascript letterSpacing属性 示例
<html>
<head>
<script type="text/javascript">
function changeLetterSpacing()
{
document.getElementById("p1").style.letterSpacing="3";
document.getElementById("p2").style.letterSpacing="-1";
}
</script>
</head>
<body>
<p id="p1">This is an example paragraph.</p>
<p id="p2">This is another example paragraph.</p>
<input type="button" onclick="changeLetterSpacing()"
value="Change letter-spacing" />
</body>
</html>运行实例 »
点击 "运行实例" 按钮查看在线实例