亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

HTML+CSS Easy to Get Started with Block Elements of Fluid Model

Let’s talk about the flow model first. Flow is the default web page layout mode. That is to say, the HTML web elements of the web page in the default state distribute the web page content according to the flow model.

The fluid layout model has two typical characteristics:

First, the block elements will be vertically extended and distributed in order from top to bottom within the containing element, because in By default, the width of block elements is 100%. In fact, block elements all occupy positions in the form of rows.

Below we write an example of a block element under the flow model. The code is as follows:

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>流動模式下的塊狀元素</title>
<style type="text/css">
#box1{
    width:300px;
    height:100px;
}
div,h1,p{
    border:1px solid red;
}
</style>
</head>
<body>
    <div id="box2">中國</div><!--塊狀元素,由于沒有設置寬度,寬度默認顯示為100%--> 

    <h1>PHP 中文網(wǎng)</h1><!--塊狀元素,由于沒有設置寬度,寬度默認顯示為100%--> 

    <p>測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼</p>
    <!--塊狀元素,由于沒有設置寬度,寬度默認顯示為100%--> 
    
    <div id="box1">強軍</div><!--塊狀元素,由于設置了width:300px,寬度顯示為300px-->
</body>
</html>

The width of the three block element labels (div, h1, p) in the above code is displayed as 100%

Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>流動模式下的塊狀元素</title> <style type="text/css"> #box1{ width:300px; height:100px; } div,h1,p{ border:1px solid red; } </style> </head> <body> <div id="box2">中國</div><!--塊狀元素,由于沒有設置寬度,寬度默認顯示為100%--> <h1>PHP 中文網(wǎng)</h1><!--塊狀元素,由于沒有設置寬度,寬度默認顯示為100%--> <p>測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼測試代碼</p> <!--塊狀元素,由于沒有設置寬度,寬度默認顯示為100%--> <div id="box1">強軍</div><!--塊狀元素,由于設置了width:300px,寬度顯示為300px--> </body> </html>
submitReset Code