display: grid布局

.footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  color: var(--white);
}

@media only screen and (max-width: 998px) and (min-width: 768px){
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2rem;
    .footer-center:last-child{
      /* 列合并 */
      grid-column: 1 / span 2;
    }

  }
}

@media only screen and (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }
}
image.png
@media only screen and (max-width: 998px) and (min-width: 768px)
@media only screen and (max-width: 768px)

你可能感兴趣的:(display: grid布局)