javascript lineHeight property
Translation results:
英 [lain hait] 美 [laɪn haɪt]
行高
javascript lineHeight propertysyntax
Function:Set the distance between rows (row height).
Syntax: Object.style.lineHeight=normal|number|length|%
javascript lineHeight propertyexample
<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>
Run instance »
Click the "Run instance" button to view the online instance