国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

CSS 尺寸 (Dimension)

CSS 尺寸 (Dimension)屬性

屬性描述
height設置元素的高度。
line-height設置行高。
max-height設置元素的最大高度。
max-width設置元素的最大寬度。
min-height設置元素的最小高度。
min-width設置元素的最小寬度。
width設置元素的寬度。

實例

使用百分比設置圖像的高度

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>php中文網(wǎng)(php.cn)</title>
    <style>
        html {height:100%;}
        body {height:100%;}
        img.normal {height:auto;}
        img.big {height:30%;}
        img.small {height:10%;}
    </style>
</head>

<body>
<img class="normal" src="/upload/course/000/000/006/5809800b44336872.jpg" width="95" height="84" /><br>
<img class="big" src="/upload/course/000/000/006/5809800b44336872.jpg" width="95" height="84" /><br>
<img class="small" src="/upload/course/000/000/006/5809800b44336872.jpg" width="95" height="84" />
</body>
</html>

運行程序嘗試一下


實例

設置元素的最低高度

       <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>php中文網(wǎng)(php.cn)</title>
    <style>
        p
        {
            min-height:100px;
            background-color:yellow;
        }
    </style>
</head>

<body>
<p>這一段的最小高度設置為100 px。</p>
</body>
</html>

運行程序嘗試一下




繼續(xù)學習
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> html {height:100%;} body {height:100%;} img.normal {height:auto;} img.big {height:30%;} img.small {height:10%;} </style> </head> <body> <img class="normal" src="https://img.php.cn/upload/course/000/000/006/5809800b44336872.jpg" width="95" height="84" /><br> <img class="big" src="https://img.php.cn/upload/course/000/000/006/5809800b44336872.jpg" width="95" height="84" /><br> <img class="small" src="https://img.php.cn/upload/course/000/000/006/5809800b44336872.jpg" width="95" height="84" /> </body> </html>
提交重置代碼
  • 推薦課程
  • 評論
  • 問答
  • 筆記
  • 課件下載