瀑布流

纯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.228640s