Ich muss dieses Design mit CSS Grid reproduzieren und habe versucht, bestimmte Rasterelemente zu positionieren, um das Ergebnis zu erhalten, aber ohne Erfolg.
Das ist es, was ich derzeit habe. Ich muss ein paar Dinge reparieren, aber vorher möchte ich die Struktur in Ordnung bringen.
Angehängter Codeausschnitt:
.grid-container { display: grid; grid-template-columns: repeat(13, minmax(30px, auto)); gap: 30px; } .grid-item { background-color: red; height: 50px; width: 50px; }
<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 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 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 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 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>
Ich habe erfolglos versucht, mit grid-template-rows
das Layout zu ändern. Irgendwelche Vorschläge?