<div class='container'>
<div class='item a'><h1>A</h1></div>
<div class='item b'><h1>B</h1></div>
<div class='item c'><h1>A</h1></div>
<div class='item d'><h1>B</h1></div>
<div class='item e'><h1>A</h1></div>
<div class='item f'><h1>B</h1></div>
<div class='item g'><h1>A</h1></div>
<div class='item h'><h1>B</h1></div>
<div class='item i'><h1>A</h1></div>
<div class='item j'><h1>B</h1></div>
<div class='item k'><h1>A</h1></div>
<div class='item l'><h1>B</h1></div>
<div class='item m'><h1>A</h1></div>
<div class='item n'><h1>B</h1></div>
<div class='item o'><h1>A</h1></div>
<div class='item p'><h1>B</h1></div>
<div class='item q'><h1>A</h1></div>
<div class='item r'><h1>B</h1></div>
<div class='item s'><h1>A</h1></div>
<div class='item t'><h1>B</h1></div>
<div class='item u'><h1>A</h1></div>
<div class='item v'><h1>B</h1></div>
<div class='item w'><h1>A</h1></div>
<div class='item x'><h1>B</h1></div>
</div>
.container {
width: 300px;
height: 300px;
display: grid;
grid-gap: 5px;
grid-template-areas:
"a b c d e f"
"h . j g . i"
"k l . . m n"
"p . r o . q"
"s t u v w x";
}
.item {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.item h1 {
margin: 0;
color: white;
}
.item.a {
background-color: #ff914d;
grid-area: a;
}
.item.b {
background-color: #7ed957;
grid-area: b;
}
.item.c {
background-color: #ff914d;
grid-area: c;
}
.item.d {
background-color: #7ed957;
grid-area: d;
}
.item.e {
background-color: #ff914d;
grid-area: e;
}
.item.f {
background-color: #7ed957;
grid-area: f;
}
.item.g {
background-color: #ff914d;
grid-area: g;
}
.item.h {
background-color: #7ed957;
grid-area: h;
}
.item.i {
background-color: #ff914d;
grid-area: i;
}
.item.j {
background-color: #7ed957;
grid-area: j;
}
.item.k {
background-color: #ff914d;
grid-area: k;
}
.item.l {
background-color: #7ed957;
grid-area: l;
}
.item.m {
background-color: #ff914d;
grid-area: m;
}
.item.n {
background-color: #7ed957;
grid-area: n;
}
.item.o {
background-color: #ff914d;
grid-area: o;
}
.item.p {
background-color: #7ed957;
grid-area: p;
}
.item.q {
background-color: #ff914d;
grid-area: q;
}
.item.r {
background-color: #7ed957;
grid-area: r;
}
.item.s {
background-color: #ff914d;
grid-area: s;
}
.item.t {
background-color: #7ed957;
grid-area: t;
}
.item.u {
background-color: #ff914d;
grid-area: u;
}
.item.v {
background-color: #7ed957;
grid-area: v;
}
.item.w {
background-color: #ff914d;
grid-area: w;
}
.item.x {
background-color: #7ed957;
grid-area: x;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.