css height property


  Translation results:

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

n.Height; height, altitude; highland; top, vertex

Plural: heights

css height propertysyntax

Function:Set the height of the element.

Description: This attribute defines the height of the element's content area. Padding, borders and margins can be added outside the content area. Inline non-replaced elements ignore this attribute.

Note: All major browsers support the height attribute.

css height propertyexample

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

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A