瀑布流

rowGrid - 响应式图片排列jQuery插件

阿里云


rowGrid.js 是一款能自动排列图片的 jquery 响应式图片排列插件。rowGrid 图片排列插件能根据屏幕的大小自动调整每行的图片数量,并可以自由的调整图片的 margin 等属性,首先引入 js 文件

  1. <script src="path/to/jquery.min.js" >
  2. <script src="path/to/jquery.row-grid.min.js" >
也想出现在这里?联系我们
创客主机

HTML 结构

  1. <div class="container">
  2.   <div class="item">
  3.     <img src="path/to/image" width="120" height="100" />
  4.   </div>
  5.   <div class="item">
  6.     <img src="path/to/image" width="130" height="100" />
  7.   </div>
  8.   ...
  9. </div>

CSS 样式

  1. .container {
  2.   background: #eee;
  3. }
  4. /* clearfix */
  5. .container:before,
  6. .container:after {
  7.     content: "";
  8.     display: table;
  9. }
  10. .container:after {
  11.     clear: both;
  12. }
  13.  
  14. .item {
  15.   float: left;
  16.   margin-bottom: 10px; 
  17. }
  18. .item img {
  19.   max-width: 100%;
  20.   max-height: 100%;
  21.   vertical-align: bottom;
  22. }
  23. .first-item {
  24.   clear: both;
  25. }
  26. /* remove margin bottom on last row */
  27. .last-row, .last-row ~ .item {
  28.   margin-bottom: 0;
  29. }

更多信息:http://brunjo.github.io/rowGrid.js/

rowGrid - 响应式图片排列 jQuery 插件

已有 406 人购买
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(1)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!