英 [ha?t]? ?美 [ha?t]??

n.身高;高度,海拔;高地;絕頂,頂點(diǎn)

復(fù)數(shù): heights

css height屬性 語(yǔ)法

作用:設(shè)置元素的高度。

說明:這個(gè)屬性定義元素內(nèi)容區(qū)的高度,在內(nèi)容區(qū)外面可以增加內(nèi)邊距、邊框和外邊距。行內(nèi)非替換元素會(huì)忽略這個(gè)屬性。

注釋:所有主流瀏覽器都支持 height 屬性。

css height屬性 示例

<html>
<head>
<style type="text/css">
img.normal 
{
height: auto
}

img.big 
{
height: 160px
}

img.small 
{
height: 30px
}
</style>
</head>
<body>

<img class="normal" src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />
<br />
<img class="big" src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />
<br />
<img class="small" src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg" />

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例