英 [lain hait] 美 [laən hait]

行高

자바스크립트 lineHeight 속성 통사론

기능: 행 사이의 거리(행 높이)를 설정합니다.

구문: ​​Object.style.lineHeight=normal|number|length|%

자바스크립트 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>

인스턴스 실행 »

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요