Jquery 滑动图像
我正在使用Jquery 滑动图像,jquery,html,Jquery,Html,我正在使用在jsp页面中滑动图像。但是,我找不到如何将图像从jsp页面的右侧顶部滑动到右侧底部。有人能帮我怎么做吗?您可以使用jQuery的原生animate()函数: HTML: jQuery: $(function() { $theBox = $("#box"); $theBox.animate({ top:$(window).height()-$theBox.height() }, 1000); }); 看看jQuery的.animate()
在jsp页面中滑动图像。但是,我找不到如何将图像从jsp页面的右侧顶部滑动到右侧底部。有人能帮我怎么做吗?您可以使用jQuery的原生animate()函数:
HTML:
jQuery:
$(function() {
$theBox = $("#box");
$theBox.animate({
top:$(window).height()-$theBox.height()
}, 1000);
});
看看jQuery的.animate()。顺便说一句,这是一个客户端HTML/CSS/JavaScript问题。这与JSP无关。你是说垂直字幕?关于垂直旋转木马的搜索
#box{
position:absolute;
right:0px;
top:0px;
}
$(function() {
$theBox = $("#box");
$theBox.animate({
top:$(window).height()-$theBox.height()
}, 1000);
});