javascript lineHeight屬性
翻譯結果:
英 [lain hait] 美 [laɪn haɪt]
行高
javascript lineHeight屬性語法
作用:設定行之間的距離(行高)。
語法:Object.style.lineHeight=normal|number|length|%
javascript lineHeight屬性範例
<html> <head> <script type="text/javascript"> function changeLineHeight() { document.getElementById("div1").style.lineHeight="2"; } </script> </head> <body> <div id="div1"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div> <br /> <input type="button" onclick="changeLineHeight()" value="Change line-height" /> </body> </html>
執行實例 »
點擊 "執行實例" 按鈕查看線上實例