...
实现方法: .将上文提到的以下JS内容删除: .imagelogo .mouseover function obj this i timer null clearInterval timer timer setInterval function obj.css position : relative , left :i px i i , .imagelogo .mouseout function ...
2016-04-06 10:20 0 6529 推荐指数:
...
<li onmouseout="this.className='off'"><a href=""> src="../活力广州_files/admin.png" a ...
...
...
把代码加到style.css(模板的主css里面): /**图片抖动**/ img:hover{-webkit-animation: tada 1s .2s ease both;-moz-animation: tada 1s .2s ease both ...
View Code ...
今天来写一个关于图片抖动的效果,需求是:点击图片,让其抖动几下停止(类似于苹果手机填错密码之后会抖一下的效果),其实想要实现这个效果,原理就是,点击之后,让其左移动下然后右移动一下(每移动一下减几像素知道减到0),然后将其放入定时器内,让其慢慢自动停下来。来看代码布局: 接下 ...