<div class="grid">
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
	<div class="item"></div>
</div>
* {
	box-sizing: border-box;
}

body {
	background-color: #212121;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	grid-auto-rows: 200px;
	gap: 20px;
	max-width: 1200px;
	counter-reset: item;
	margin: 40px auto;
}

.item {
	background-color: orange;
	border: 2px solid darken(orange, 10%);
	border-radius: 0.25em;
	counter-increment: item;
	padding: 20px;
	
	&::after {
		content: counter(item);
	}
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.