五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 建站教程 > JavaScript 教程 > HTML DOM lineHeight 屬性

HTML DOM lineHeight 屬性

此節(jié)有 223 人學(xué)習過     參與評論

定義和用法

lineHeight 屬性設(shè)置行之間的距離(行高)。

語法:

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

可能的值

描述
normal 默認。設(shè)置合理的行間距。
number 設(shè)置數(shù)字,此數(shù)字會與當前的字體尺寸相乘來設(shè)置行間距。
length 設(shè)置固定的行間距。
% 基于當前字體尺寸的百分比行間距。

實例

本例改變行高:

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

親自試一試

lineHeight - 改變行高

如對本文有疑問,請?zhí)峤坏浇涣髡搲瑥V大熱心網(wǎng)友會為你解答??! 點擊進入論壇

發(fā)表評論 (223人查看,0條評論)
請自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴禁發(fā)布色情、暴力、反動的言論。
昵稱:
最新評論
------分隔線----------------------------
JavaScript 教程目錄

其它欄目

· 建站教程
· 365學(xué)習

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號