时间:2021-07-01 10:21:17 帮助过:7人阅读
1.看看效果吧!
2.html代码index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> ul{position: relative;padding: 0 -3px;list-style: none;width: 600px;margin: 0 auto} li{width: 33.33%;position: absolute;box-sizing: border-box;display: block; } img{width: 100%;height: auto;display: block;} </style> <script src="./jquery-1.12.4.min.js"></script> </head> <body style="background: #000"> <ul class="flowLayout-box"> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u17.png" alt=""></li> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u19.png" alt=""></li> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u114.png" alt=""></li> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u116.png" alt=""></li> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u118.png" alt=""></li> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u120.png" alt=""></li> <li class="flowLayout-item"> <img class="flowLayout-pic" src="./img/u132.png" alt=""></li> </ul> </body> </html>
3.插件代码
4.调用代码
代码简单,容易修改,,拿去用吧。
相关推荐:
jQuery Masonry瀑布流布局详解
JS实现瀑布流布局实例
JS实现瀑布流布局的实例分析
瀑布流布局视频资料分享
利用JavaScript实现瀑布流布局的效果代码
以上就是超简单的瀑布流布局实现方法的详细内容,更多请关注Gxl网其它相关文章!