英 [ha?t]? ?美 [ha?t]??
n.身高;高度,海拔;高地;絕頂,頂點(diǎn)
複數(shù): heights
css height屬性 語法
作用:設(shè)定元素的高度。
說明:這個(gè)屬性定義元素內(nèi)容區(qū)的高度,在內(nèi)容區(qū)外面可以增加內(nèi)邊距、邊框和外邊距。行內(nèi)非替換元素會(huì)忽略這個(gè)屬性。
註解:所有主流瀏覽器都支援 height 屬性。
css height屬性 範(fàn)例
<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>
執(zhí)行實(shí)例 ?
點(diǎn)擊 "執(zhí)行實(shí)例" 按鈕查看線上實(shí)例