【发布时间】:2015-10-12 00:37:14
【问题描述】:
我要为右侧的图像表单设置动画。当页面向下滚动其不可见并且当页面到达那里时图像从现在开始浮动我可以像这样检测滚动的位置
jQuery(document).ready(function($){
var target = $(".myimages").offset().top;
var interval = setInterval(function() {
if ($(window).scrollTop() >= target) {
alert("image found ");
//here float the image
}
}, 250);
});
现在我想做的是将图像从右上角浮动到其宽度。我只知道它可以使用这样的动画
$('.myimages').animate({css properties here})
但是不知道怎么用,请帮忙
【问题讨论】:
标签: javascript jquery html css animation