美文网首页
display: grid布局

display: grid布局

作者: royluck | 来源:发表于2022-08-29 10:59 被阅读0次
    .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布局

          本文链接:https://www.haomeiwen.com/subject/ctelnrtx.html