如何在网站的底部加载网页。 [英] How to have a web page load at the bottom of the site.
问题描述
我正在创建一个反向网站,这意味着页面上的开始位置在底部,您向上滚动浏览内容。一个简单的命令来解释我的意思是 http://url.com/#bottom (或#footer) 。但是,我想避免创建一个ENTER网站页面,线#bottom,我不能使用重定向到任何#adress的URL。
I am creating a reverse site, meaning the opening spot on the page is at the bottom and you scroll up to go through content. a simple command to explain what i mean is http://url.com/#bottom (or #footer). However i want to avoid having to create an "ENTER" site page that lines to #bottom and i cannot use a URL redirect to any #adress.
没有我不想欺骗一些免费的服务器或东西,你可以检查我想在Sean-holt.com做什么。 (注意im仍然在开始的工作,但只是到底部,然后向上滚动,我想要的网站在世界的图片打开)。
No im not trying to spoof some free server or something, you can checkout what im trying to do at Sean-holt.com. (note im still in the beginning of the work. but just go to the bottom and then scroll up, I want the site to open at the picture of the world).
我只想让观众看到的第一个地方是页面的底部,然后向上滚动。
I just want the first place the viewer to see is the bottom of the page and then have to scroll up.
我如何做到这一点?
非常感谢您的帮助!!!!!你们摇滚!
Thanks a lot for your help!!!!! you guys rock!
(PS这是我第一次使用堆栈溢出!)
(P.S. This is the first time i have used stack Overflow!)
推荐答案
我认为你应该使用Javascript / jQuery而不是再次重定向
I think you should do it with Javascript/jQuery instead of redirecting again
把它放在文件的head标签中
Put this in the head tag of your file
<script>
// after dom is loaded
$(function() {
// scroll all the way down
$('html, body').scrollTop($(document).height() - $(window).height());
});
</script>
这篇关于如何在网站的底部加载网页。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!