首页 > 代码库 > 瀑布流
瀑布流
就是利用css3中的column-width规定列的宽度
<!DOCTYPE HTML><html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>瀑布流</title> <style> .container { column-width: 160px; column-gap: 5px; } .waterfall { border-radius: 5px; background: #D9D9D9; border: #CCC 1px solid; display: inline-block; width: 100%; margin-top: 5px; height: 200px; } .spe { border-radius: 5px; background: #D9D9D9; border: #CCC 1px solid; display: inline-block; width: 100%; margin-top: 5px; height: 66px; } </style></head><body><div class="container"> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="waterfall"></div> <div class="spe"></div> <div class="waterfall"></div> <div class="waterfall"></div></div></body></html>
瀑布流
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。