為什么div覆蓋了,相互的內(nèi)容卻沒覆蓋呢?
<html>
? ? <head><title>混合布局</title>
? ? <style type="text/css">
? ? .top{height:100px;background:gray;}
? ? .left{height:400px;width:200px;float:left;background:blue;}
? ? .right{height:400px;width:700px;float:right;background:green;}
? ? .foot{height:500px;background:orange;}
? ? </style>
? ? ? ? </head>
? ? <body>
? ? <div class="top">top</div>
? ? <div class="left">left</div>
? ? <div class="right">right</div>
? ? <div class="foot">foot</div>
? ? </body>
? ? </html>
2022-03-23
bootstrap中的每個(gè)控件都有自己的用法,其中表單控件中的單選按鈕和復(fù)選按鈕需要遵循以下規(guī)則:j==i一個(gè)數(shù)直接就完了,不循環(huán)了
2017-02-05
left和right兩個(gè)div都設(shè)置了float,直接脫離了文檔流。所以foot會(huì)覆蓋前面兩個(gè)div
建議給foot添加以下屬性:
.foot{height:100px;width:100%;background:orange;position:absolute;bottom:0;}
postion的設(shè)置可以使得它固定在底部。