2
A
回答
4
了可以使用的高度絕對定位的div和百分比和寬度。
body {
padding: 0;
margin: 0;
}
.container {
overflow: auto;
}
.box {
background: #000;
display: block;
}
.one {
position: absolute;
height: 40%;
width: 57.5%;
left: 0;
top: 0;
}
.two {
position: absolute;
height: 25%;
width: 40%;
right: 0;
top: 0;
}
.three {
position: absolute;
height: 55%;
width: 35%;
left: 0%;
bottom: 0;
}
.four {
position: absolute;
height: 25%;
width: 20%;
left: 37.5%;
top: 45%;
}
.five {
position: absolute;
height: 40%;
width: 40%;
right: 0;
top: 30%;
}
.six {
position: absolute;
height: 25%;
width: 62.5%;
right: 0;
bottom: 0;
}
<div class="container">
<div class="one box"></div>
<div class="two box"></div>
<div class="three box"></div>
<div class="four box"></div>
<div class="five box"></div>
<div class="six box"></div>
</div>
1
<div class="container" style="position: relative;">
<div class="sidebar" style="background-color: red; height: 214px; width: 214px; position: relative;margin-right: 76px;right: -1px;padding-right: 0px;"></div>
<div class="content" style="background-color: blue; height: 100px; width: 120px; position: relative;top: -214px;left: 223px;"></div>
<div class="subscript" style="background-color: green; height: 198px; width: 121px; position: relative;top: -195px;left: 222px;"></div>
<div class="sidebar" style="background-color: black; height: 227px; width: 100px;position: relative;top: -287px;"></div>
<div class="content" style="background-color: #434343; height: 100px; width: 105px; position: relative;top: -514px;left: 107px;"></div>
<div class="subscript" style="background-color: #462312; height: 109px; width: 231px; position: relative;top: -499px;left: 108px;"></div>
</div>
+0
抱歉,但你是一個2列幀佈局。我需要另一種解決方案 – user1154112
相關問題
- 1. 使用CSS和HTML的瓷磚佈局
- 2. 錯誤的瓷磚佈局
- 3. 瓷磚基礎佈局
- 4. 佈局與2種類型的瓷磚
- 5. 沒有瓷磚的彈簧mvc佈局
- 6. Ajax瓷磚流佈局網格?
- 7. CSS瓷磚定位
- 8. 布爾瑪的CSS - 劃分瓷磚子框在2等寬瓷磚
- 9. CSS居中瓷磚(可調寬度)
- 10. 菜單使用瓷磚和純CSS的子圖
- 11. css佈局問題:安排一個包含ul的css佈局
- 12. 地鐵瓷磚樣式CSS
- 13. CSS瓷磚大小調整
- 14. 瓷磚純淨配置xml出現
- 15. html5畫布緩存瓷磚
- 16. 流體佈局純CSS
- 17. 的OpenLayers,層數:瓷磚與瓷磚單
- 18. 瓷磚遊戲上的重複瓷磚
- 19. 相同的佈局,不同的內容使用瓷磚
- 20. 學校安排打印CSS佈局
- 21. 瓷磚地圖產生奇怪的佈局
- 22. 瓷磚 - 訪問父級佈局中的子屬性
- 23. MapBox MB瓷磚vs矢量瓷磚
- 24. Struts瓷磚1 - 嵌套瓷磚問題
- 25. 瓷磚系統和瓷磚圖
- 26. 誰能告訴我如何對齊城市UI CSS佈局瓷磚
- 27. CSS並排佈局
- 28. 重新排列區域內的瓷磚
- 29. 「液體」瓷磚滾動的CSS/JS
- 30. 10用jQuery或CSS定位的瓷磚
你能告訴你實驗嗎?加入一些代碼將有助於我們 –
不能以'flexbox' ......當CSS網格即將投產然後是。 –