선 사이의 거리를 설정하려면 lineHeight 재산. 다음 코드를 실행하여 JavaScript로 텍스트의 줄 사이의 거리를 설정할 수 있습니다 -
예시
<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<p id="myID">This is Demo Text.<br>This is Demo Text<br>This is Demo Text</p>
<button type="button" onclick="display()">Set distance between lines</button>
<script>
function display() {
document.getElementById("myID").style.lineHeight = "2";
}
</script>
</body>
</html>