<section>
<div class="grid__container">
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
<div class="grid__item"></div>
</div>
</section>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100vw;
min-height: 100vh;
display: flex;
justify-content: center;
flex-direction: column;
gap: 20px;
font-family: "Exo", Arial, sans-serif;
background-color: #f7f7f7;
padding: 20px;
}
section {
margin: 0 auto;
display: flex;
box-shadow: 0 0 0 6px rgb(0 0 0 / 13%);
border-radius: 3px;
gap: 20px;
min-width: 40vw;
}
.grid__item {
display: flex;
justify-content: center;
align-items: center;
padding: 5px;
background-color: #f7f7f7;
position: relative;
counter-increment: item;
}
.grid__item::before {
content: counter(item);
color: #fff;
font-size: 1.2rem;
text-shadow: 1px 1px 0 rgba(0 0 0 / 0.25);
z-index: 2;
background-color: rgb(0 0 0 / 0.6);
background-image: conic-gradient(
from 90deg at 40% -25%,
#ffd700,
#f79d03,
#ee6907,
#e6390a,
#de0d0d,
#d61039,
#cf1261,
#c71585,
#cf1261,
#d61039,
#de0d0d,
#ee6907,
#f79d03,
#ffd700,
#ffd700,
#ffd700
);
width: 32px;
aspect-ratio: 1 / 1;
display: inline-flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
.grid__item:nth-child(1) {
background-color: #f1c2c6;
}
.grid__item:nth-child(2) {
background-color: #dac2f1;
}
.grid__item:nth-child(3) {
background-color: #ccf1c2;
}
.grid__item:nth-child(4) {
background-color: #c2e9f1;
}
.grid__item:nth-child(5) {
background-color: #f1ebc2;
}
.grid__item:nth-child(6) {
background-color: #09f;
}
.grid__item:nth-child(7) {
background-color: #ff5722;
}
.grid__item:nth-child(8) {
background-color: #8bc34a;
}
.grid__item:nth-child(9) {
background-color: #f66803;
}
.grid__item:nth-child(10) {
background-color: #0d815f;
}
.grid__item:nth-child(11) {
background-color: #28d1c2;
}
.grid__item:nth-child(12) {
background-color: #4a28d1;
}
.form {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
}
.grid__container {
box-shadow: 0 0 0 2px red;
border-radius: 2px;
width: 100%;
display: grid;
grid-template-columns: 1fr 10px 1fr 20px 1fr 30px 1fr;
grid-template-rows: 1fr 10px 1fr 20px 1fr;
}
.grid__item:nth-child(1) {
grid-area: 1 / 1 / 2 / 2;
}
.grid__item:nth-child(2) {
grid-area: 1 / 3 / 2 / 4;
}
.grid__item:nth-child(3) {
grid-area: 1 / 5 / 2 / 6;
}
.grid__item:nth-child(4) {
grid-area: 1 / 7 / 2 / 8;
}
.grid__item:nth-child(5) {
grid-area: 3 / 1 / 4 / 2;
}
.grid__item:nth-child(6) {
grid-area: 3 / 3 / 4 / 4;
}
.grid__item:nth-child(7) {
grid-area: 3 / 5 / 4 / 6;
}
.grid__item:nth-child(8) {
grid-area: 3 / 7 / 4 / 8;
}
.grid__item:nth-child(9) {
grid-area: 5 / 1 / 6 / 2;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.