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

行高

Javascript lineHeight-Eigenschaft Syntax

Funktion: Stellen Sie den Abstand zwischen Reihen (Reihenh?he) ein.

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

Javascript lineHeight-Eigenschaft Beispiel

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

Instanz ausführen ?

Klicken Sie auf die Schaltfl?che ?Instanz ausführen“, um die Online-Instanz anzuzeigen