多列布局实现瀑布流效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>多列瀑布流</title>
<style>
*{
margin:0;
padding:0;
box-sizing: border-box;
}
body{
background:#352323 url(img/a.png);
}
img{
display:block;
}
section{
max-width:95%;
margin:0 auto;
overflow:hidden;
column-count: 5;
column-gap:0;
column-fill: auto;
}
figure{
border:2px solid pink;
margin:0 5px 10px;
/*避免列断层*/
break-inside: avoid;
padding:5px;
}
figure img{
width:100%;
}
figcaption{
padding:10px 0;
text-align:center;
font-weight:900;
color:#a77869;
}
</style>
</head>
<body>
<!-- <section> -->
<section>
<figure>
<img src="img/1.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/2.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/3.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/4.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/5.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/6.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/7.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/8.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/9.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/10.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/11.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/12.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/13.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/14.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/15.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/16.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/17.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/18.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/19.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/20.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/21.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/22.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/23.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/24.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/25.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/26.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/27.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/28.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/29.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/30.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/31.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/32.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/33.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/34.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/35.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/36.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/37.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/38.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/39.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/40.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/41.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/42.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/43.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/44.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/45.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/46.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/47.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/48.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/49.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
<figure>
<img src="img/50.jpg" alt="">
<figcaption>往后余生,风雪是你</figcaption>
</figure>
</section>
</body>
</html>
本文来自博客园,作者:JackieDYH,转载请注明原文链接:https://www.cnblogs.com/JackieDYH/p/17634879.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现