Siatka grid w css

<div class="container">
  <div class="col-1">col-1</div>
  <div class="col-2">col-2</div>
  <div class="col-3">col-3</div>
  <div>col-4</div>
  <div>col-4</div>
  <div>col-4</div>
  <div>col-4</div>
</div>
.container {
  width: 1000px;
  height: 500px;
  margin: 30px auto;
  
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  
  & > * {
    border: 5px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
  .col-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }
  .col-2, .col-3 {
    grid-column: 3 / 5;
  }
}
Komentarze wyłączone