<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: 1fr 1fr 1fr;
	grid-template-rows: 100px 100px 100px;
}

.grid__item {
  display: grid;
  align-items: center;
  justify-items: center;
}

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

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

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

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

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

.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.