<div class="grid">
  <div class="grid__item">Grid1</div>
  <div class="grid__item">Grid2</div>
  <div class="grid__item">Grid3</div>
  <div class="grid__item">Grid4</div>
  <div class="grid__item">Grid5</div>
  <div class="grid__item">Grid6</div>
  <div class="grid__item">Grid7</div>
  <div class="grid__item">Grid8</div>
  <div class="grid__item">Grid9</div>
</div>
.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: 150px 150px 150px;
	background: #eee;
}

.grid__item:nth-child(1) {
	background: #f8bbd0;
}

.grid__item:nth-child(2) {
	background: #d1c4e9;
}

.grid__item:nth-child(3) {
	background: #bbdefb;
}

.grid__item:nth-child(4) {
	background: #b2ebf2;
}

.grid__item:nth-child(5) {
	background: #e6ee9c;
}

.grid__item:nth-child(6) {
	background: #DCEDC8;
}

.grid__item:nth-child(7) {
	background: #FFF9C4;
}

.grid__item:nth-child(8) {
	background: #FFCCBC;
}

.grid__item:nth-child(9) {
	background: #F8BBD0;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.