英 [haɪt]   美 [haɪt]  

n.身高;高度,海拔;高地;绝顶,顶点

复数: heights

css height属性 语法

作用:设置元素的高度。

说明:这个属性定义元素内容区的高度,在内容区外面可以增加内边距、边框和外边距。行内非替换元素会忽略这个属性。

注释:所有主流浏览器都支持 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>

运行实例 »

点击 "运行实例" 按钮查看在线实例

热门推荐