Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/91.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 滑动图像_Jquery_Html - Fatal编程技术网

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);
}); ​