英 [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>
运行实例 »
点击 "运行实例" 按钮查看在线实例