CSS Flex Box 2x2 Layout erzeugen?
Wie bekomme ich mit CSS Flexbox so ein Layout:
1 Antwort
![](https://images.gutefrage.net/media/user/regex9/1455660989427_nmmslarge__0_13_270_270_615d5a3bc6888f4c1486ce2b4d9d8f60.png?v=1455660989000)
Von gutefrage auf Grund seines Wissens auf einem Fachgebiet ausgezeichneter Nutzer
Computer, HTML, Webseite
HTML:
<div class="container">
<div class="box-1">Box 1</div>
<div class="box-2">Box 2</div>
<div class="box-3">Box 3</div>
<div class="box-4">Box 4</div>
</div>
CSS:
.container {
display: flex;
flex-wrap: wrap;
}
.box-1 {
background: red;
width: 80%;
}
.box-2 {
background: yellow;
width: 20%;
}
.box-3 {
background: green;
width: 20%;
}
.box-4 {
background: blue;
width: 80%;
}
![](https://images.gutefrage.net/media/default/user/15_nmmslarge.png?v=1551279448000)