IM(開始學習CSS前兩天)。這是我的頁面的底部: https://gyazo.com/b681e5ca06f7f89bac727ea20a1ff3dd頁腳div元素有我的頁腳中的問題重疊
現在我想的鏈接,堅持底部,但不會操縱利潤分別爲每個div。所以我試圖讓父div有位置:相對和內部元素有位置:絕對。 發生的事情是這樣的: https://gyazo.com/0031cbb528e4c80600f1533f4b60993d
對CSS的相關代碼:
.footer {
width: 100%;
height: 200px;
float: left;
position: relative;
display: inline-block;
}
.infotype {
float: left;
display: inline-block;
color: black;
width: 30%;
margin-left: 30px;
bottom: 0 auto;
position: absolute;
}
爲HTML相關代碼:
<section class="row">
<div class="footer">
<div class="infotype data">
<h3>Rockets and spacecraft</h3>
<a href="#">Falcon 9</a><br>
<a class="info" href="#">Falcon Heavy</a><br>
<a class="info" href="#">Dragon</a>
</div>
<div class="infotype updates">
<h3>Updates</h3>
<a class="info" href="#">News</a><br>
<a class="info" href="#">Launch Manifest</a>
</div>
<div class="infotype about">
<h3>About SpaceX</h3>
<a class="info" href="#">Company</a><br>
<a class="info" href="#">Careers</a><br>
<a class="info" href="#">Gallery</a><br>
<a class="info" href="#">Shop</a>
</div>
</div>
</section>
對不起,我可憐的格式化的技能,就像我提到的我是新來的。
如果刪除什麼位置:絕對? – tech2017
多數民衆贊成在事 - 當我刪除它,我得到我張貼的第一張圖片。 – dvd280