纯CSS实现瀑布流
<style>
.container{
    column-count: 2;
    column-gap: 10px;
}
 
.container > .item{
    width: 100%;
    break-inside: avoid;                   //重要属性,防止容器内部元素被分开放于两列
    -webkit-column-break-inside: avoid;    
    margin-bottom: 10px;                   //容器内部元素垂直方向的间距
}
</style>


复制内容

留言讨论


评论


乖,登录后才可以留言! 登录

广而告之

Copyright © 2020-2023 春藤技术,春藤建站 All Rights Reserved
备案号:豫ICP备20020705号 公网安备 51LA统计
0.215555s