HTML5+jQuery制作平滑拖拽效果

Add

Installation

To install download one of these packages and include the jquery.gridly.js and jquery.gridly.css files in your head with the following:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js" type="text/javascript"></script>
<script src="javascript/jquery.gridly.js" type="text/javascript"></script>
<link href="stylesheets/jquery.gridly.css" rel="stylesheet" type="text/css" />

Example

Setting up a gridly is easy. The following snippet is a good start:

<style type="text/css">
  .gridly {
    position: relative;
    width: 960px;
  }
  .brick.small {
    width: 140px;
    height: 140px;
  }
  .brick.large {
    width: 300px;
    height: 300px;
  }
</style>
<div class="gridly">
  <div class="brick small"></div>
  <div class="brick small"></div>
  <div class="brick large"></div>
  <div class="brick small"></div>
  <div class="brick small"></div>
  <div class="brick large"></div>
</div>
<script>
  $('.gridly').gridly({
    base: 60, // px 
    gutter: 20, // px
    columns: 12
  });
</script>

科e互联网页特效集锦---更多特效请访问 www.internetke.com

本站导航: 网站建设 | 网页素材 | 网页特效 | 设计分享 | 建站教程 | 网站模版 | 酷站赏析

*尊重他人劳动成果,转载请自觉注明出处!注:此代码为【科e整理/原创特效】仅供学习交流,请勿用于商业用途。 加入QQ交流群