简言之,zepto 是移动端的 jQuery,虽然很多地方不完全相同,不过详细的内容就不介绍了,主要把使用 zepto 时遇到过的问题总结一下。zepto 是分成多个模块的,最基础的文件不包含 touch(事件监听模块)、fx(animate方法)、selector(jQuery选择器扩展)等模块,...
分类:
其他好文 时间:
2015-07-27 18:30:28
阅读次数:
111
在写自己项目的时候遇到了这样的一个效果,左侧菜单按钮点击弹出菜单的同时,菜单按钮变成 × 状。(参考关键字:汉堡按钮 http://www.htmleaf.com/Demo/201506232094.html)大概就是下面gif中的动画效果: 大致的动画效果如下1. 第一条横线(div)rotate...
分类:
Web程序 时间:
2015-07-17 17:54:22
阅读次数:
529
$("#banner").height($(window).height()-125); $(window).resize(function(){ $("#banner").height($(window).height()-125); }); //首页幻灯 $("...
分类:
Web程序 时间:
2015-07-17 15:50:16
阅读次数:
122
1.利用scrollLeft方法 1 2 3 4 5 6 7 8 9 无间隙滚动10 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 59 60 2.利用animate方法 ...
分类:
Web程序 时间:
2015-07-16 21:19:33
阅读次数:
164
我写了一个弹出层的功能 1 // index animate 2 function autoanimate(){ 3 var nav = document.getElementsByClassName('nav')[0]; 4 var main = document.getElem...
分类:
Web程序 时间:
2015-07-16 13:53:11
阅读次数:
137
function zadan(obj) { ? ? $(obj).children("span").hide(); ? ? eggClick($(obj)); }; function donghua() { ? ? $("#hammer").animate({ ? ? ? ? top : "150px", ? ? ? ? left : "420px" ? ? ...
分类:
Web程序 时间:
2015-07-14 13:52:32
阅读次数:
229
利用jQuery的animate() 方法,我们很容易实现滚动条的平滑滚动效果:$(function() { $('#top').click( function (e) { $('html, body').animate({scrollTop: '0px'}...
分类:
Web程序 时间:
2015-07-14 13:25:23
阅读次数:
635
$('#addbtn').on('click',function(){ $('#assist_area').show().animate({height:'170px'},300,function(){ $('#....').show(); });});选择器换成你自己的就行了
分类:
其他好文 时间:
2015-07-09 11:08:19
阅读次数:
89
$("#slideleft button").click(function(){ var $lefty = $(this).next(); $lefty.animate({ left:parseInt($lefty.css('left'),10)==0 ? -$lefty....
分类:
Web程序 时间:
2015-07-03 13:47:23
阅读次数:
125
animate.css下载地址有时候需要通过js控制重复运行动画的可以这样操作1. html代码:aaa2. js代码:$('h3').addClass('shake').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimatio...
分类:
Web程序 时间:
2015-06-29 19:47:57
阅读次数:
168