如何使用jQuery在加载时滑动整个页面 [英] How to slide an entire page on load with jquery
本文介绍了如何使用jQuery在加载时滑动整个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更改后,我想将我的整个页面向下滑动.我在想这样做的方法是创建一个垂直幻灯片,该幻灯片在单击链接时和在页面加载时再次播放?到目前为止,我只能创建一个会影响特定DIV的幻灯片.我也希望它垂直滑动.任何想法将不胜感激!
I'd like to slide my entire page down when it's changed. I'm thinking the way to do this will be to create a vertical slide that plays when a link is clicked and again when the page loads? So far, I've only been able to create a slide that affects a particular DIV. I'd also like it to slide in vertically. Any ideas will be greatly appreciated!
推荐答案
只需将所有内容包装在div中,然后将其向下滑动即可.
Just wrap all your content inside a div and slide that down.
CSS
#bodyContent {
display:none;
height: 100%;
}
HTML
<div id="bodyContent">
//all your stuff goes in here
</div>
Javascript/JQuery
$(document).ready(function(){
$('#bodyContent').slideDown();
});
这篇关于如何使用jQuery在加载时滑动整个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文