在我們熟悉了html布局之后,經(jīng)常會(huì)選用能夠滿足當(dāng)前自己需求的排版布局或習(xí)慣性選" />
時(shí)間:2023-09-26 10:48:01 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)
時(shí)間:2023-09-26 10:48:01 來(lái)源:網(wǎng)站運(yùn)營(yíng)
DIV+CSS頁(yè)面基本布局總結(jié):<!DOCTYPE html><html><head> <title>一列水平居中布局</title> <meta charset="utf-8"></head><body> <div class="one-center-col">一列布局</div></body></html>
css代碼:<style> .one-center-col { width: 1000px; height: 700px; background-color: grey; margin: 0 auto; }</style>
效果截圖:<div class="container"> <div class="leftbox">左側(cè)列</div> <div class="rightbox">右側(cè)列</div></div>
左右列的css代碼:.leftbox { width: 300px; height: 100%; background-color: #aadddd; float: left;} .rightbox { width: 700px; height: 100%; background-color: #f08844; float: right;}
效果截圖<div class="container"> <div class="leftbox">左側(cè)列</div> <div class="midbox">中間列</div> <div class="rightbox">右側(cè)列</div></div>
css部分代碼:.leftbox { width: 300px; float: left;}.midbox { width: 400px; float: left;}.rightbox { width: 300px; float: right;}
效果示意圖.leftbox { width: 300px; height: 100%; background-color: #aadddd; float: left;}.rightbox { height: 100%; margin-left: 300px; background-color: #f08844;}
基本思路分析:.container { width: 1000px; height: 700px; margin: 0 auto; position: relative;}.leftbox { width: 300px; /*左側(cè)固定寬度值*/ height: 100%; position: absolute;}.rightbox { height: 100%; margin-left: 300px; /*邊距值=左側(cè)固定寬度值*/ position: relative;}
基本思路分析:.leftbox { width: 300px; height: 100%; background-color: #aadddd; float: left;} .midbox { margin: 0 300px; height: 100%; background-color: #aa11dd;}.rightbox { width: 300px; height: 100%; background-color: #f08844; float: right;}
基本思路分析:.container { width: 1000px; height: 700px; margin: 0 auto; position: relative;}.leftbox { width: 300px; height: 100%; position: absolute; left: 0;}.midbox { margin: 0 300px; height: 100%; position: relative;}.rightbox { width: 300px; height: 100%; position: absolute; right: 0;}
思路分析:關(guān)鍵詞:布局,總結(jié),基本
客戶&案例
營(yíng)銷資訊
關(guān)于我們
客戶&案例
營(yíng)銷資訊
關(guān)于我們
微信公眾號(hào)
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。