我使用的是position: absolute;
,所以我的div可以放在底部,但我也需要使用float: left;
,這樣每個新的div都會放在它旁邊,但它們只是放在同一地點,有什麼建議?HTML/CSS:絕對定位
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.media_container{
min-width: 800px; max-height: 800px;
min-height: 300px; max-height: 300px;
border: 2px solid #f00;
position: relative;
}
.media_header{
min-width: 220px; max-width: 220px;
min-height: 50px; max-height: 50px;
border: 2px solid #f00;
float: left;
/*position: absolute;*/
margin-left: 30px;
bottom: 30px;
}
</style>
<title>Test</title>
</head>
<body>
<div class='media_container'>
<div class='media_header'>Header 1</div>
<div class='media_header'>Header 2</div>
<div class='media_header'>Header 3</div>
</div>
</body>]
@arttronics是的,謝謝! – Crispy