jquery自定义动画
使用jquery实现自定义动画方法
使用animate 实现动画
css样式
//定义图片属性
img{position:relative;}//定位代码
$(function () {
// $("img").hover(function () {
//
// $(this).animate({left:"+=2px"},200).animate({left:"-=2px"},200);
//
// }, function () {
//
// });
$("img").click(function () {
$(this).animate({left:"+=3px"},200).animate({left:"-=3px"},200);
});
});html代码
<img src="xxxx.jpg">
相关推荐
88284453 2020-05-09
83510998 2020-03-26
89463661 2020-01-17
81463166 2020-01-08
87281248 2020-07-04
tztzyzyz 2020-05-31
81463166 2020-05-17
81463166 2020-05-16
donghongbz 2020-05-15
89510194 2020-05-15
donghongbz 2020-05-15
GDYG 2020-05-04
88570299 2020-05-12
89510194 2020-05-07
tthappyer 2020-05-04
80437916 2020-05-03
牵手白首 2020-04-29