英 [lain hait] 美 [laɪn haɪt]

行高

propriété javascript lineHeight syntaxe

Fonction : Définissez la distance entre les rangées (hauteur des rangées).

Syntaxe : Object.style.lineHeight=normal|number|length|%

propriété javascript lineHeight exemple

<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>

Exécuter l'instance »

Cliquez sur le bouton « Exécuter l'instance » pour afficher l'instance en ligne