我們可以借助CSS中的?float 屬性來(lái)實(shí)現(xiàn)。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-826808.html
實(shí)例:
布局需求:
左側(cè) DIV 固定寬度,右側(cè) DIV 自適應(yīng)寬度,填充滿剩余頁(yè)面。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-826808.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>title</title>
<style>
.left {
float: left;
width: 300px;
height: 300px;
background-color: red;
}
.right {
background-color: orange;
margin-left: 310px;
height: 300px;
}
</style>
</head>
<body>
<div class="left"></div>
<div class="right"></div>
</body>
</html>
到了這里,關(guān)于HTML板塊左右排列布局——左側(cè) DIV 固定寬度,右側(cè) DIV 自適應(yīng)寬度,填充滿剩余頁(yè)面的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!