模仿万智牌卡牌效果
来源:互联网 发布:流体力学书 知乎 编辑:程序博客网 时间:2024/05/16 09:14
css
#div_count { overflow: hidden; } div ul, li { list-style: none; margin: 0; padding: 0; } img { width: 100%; height: 100%; }
布局
<div id="div_Container"> <ul> <li> <img src="img/1.png" /></li> <li> <img src="img/2.png" /></li> <li> <img src="img/3.png" /></li> <li> <img src="img/4.png" /></li> </ul> </div>
js
var Cards = (function () { var _fun = { bindHover: function (o, z_indexMax) { o.hover(function () { var _o = $(this); var i = z_indexMax; var j = 0; _o.stop(); _o.animate({ "height": "150px" }, 500) while (i--) { if (i > _o.index()) { o.eq(i).css("z-index", j); } else if (i < _o.index()) { o.eq(i).css("z-index", _o.index() - j); } else { o.eq(i).css("z-index", z_indexMax); } j++; } }, function () { var _o = $(this); _o.stop(); _o.animate({ "width": "220px", "height": "99px" }, 200) }) }, init: function (containerKey) { var fun = _fun, obj = $(containerKey), li = obj.find("li"); li.css({ "position": "absolute", "width": "220px", "height": "99px", "overflow": "hidden", "border": "1px solid red" }); var i = 0; li.each(function () { var _o = $(this); _o.css({ "margin-left": i * 20 + "px", "z-index": i }); i++; }) fun.bindHover(li, i--); } } return { Init: _fun.init } })() Cards.Init("#div_Container");
- 模仿万智牌卡牌效果
- 模仿QZONE挂图效果
- 模仿google导航效果
- DIV模仿窗口效果
- 模仿launcher的效果
- 模仿facebook布局效果
- 模仿modal效果
- 模仿语音输入效果
- 模仿126的一个效果
- Qt模仿QQ震动效果
- 模仿QQ滑动删除效果
- 模仿360水晶球的效果
- 模仿bootstrap实现边框效果
- 模仿美团抛物线效果
- 模仿艺龙手风琴效果
- 模仿电影院座位预定效果
- 模仿MSN消息提示的效果
- 模仿MSN消息提示的效果
- 常用JSP文件上传,下载的一些方法
- C# 中的委托和事件
- 十大最佳第二职业榜:软件开发、UI设计上榜
- ActiveX component can't create object这个错误怎么解决
- RMAN Crosscheck 和 Delete 命令的2个实例
- 模仿万智牌卡牌效果
- How to start&stop WMA MSCA(Mobile) port in R12/11i system
- C#委托-知识点总结
- HDU 4028
- Iterator 数组和链条
- Excel当中SUMPRODUCT函数
- 一起动手实现Windows服务程序(监控网站是否能访问) .
- C# 邮件发送辅助类
- 利用vs.net快速开发windows服务(总结)