<div class="container">
<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>
.container {
display: grid;
grid-template-columns: repeat(auto-fit, 100px);
grid-auto-rows: 100px;
justify-content: center;
gap: 2rem 1rem;
}
body {
display: flex;
align-items: center;
margin: 0;
min-height: 100vh;
background: linear-gradient(-45deg, #ff9f4d 10%, #ffc857 0, #ffc857 90%, #ff9f4d 0, #ff9f4d 100%);
}
.container {
width: 100%;
max-width: 37.5rem;
padding: 0.5rem;
margin: 0 auto;
box-sizing: border-box;
}
.item {
width: 100px;
height: 100px;
border-radius: 15px;
background-color: hsl(300deg 23% 97%);
background-image: linear-gradient(hsl(7deg 100% 64%),hsl(7deg 100% 64%)), linear-gradient(hsl(301deg 100% 15%),hsl(301deg 100% 15%));
background-size: 50px 10px, 60px 10px;
background-position: 20px 40px, 20px 60px;
background-repeat: no-repeat;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.