经典套路代码flex居中场景解决最后一行未铺满 元素居中难看问题

2024-04-29  本文已影响0人  吉凶以情迁
image.png

    .item-container {
        padding-bottom:10px;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .menu {
        display: flex;
        width: 25%;
        flex-direction: column;
        align-items: center;
        padding-top:10px;
        justify-content: center;
    }
.item-container::after {
  content: "";
  background-color: red;
  flex: auto;
}
上一篇 下一篇

猜你喜欢

热点阅读