一个网站可以启动在一个确定的div什么时候加载?我做了三块钱,像这一样。
当网站加载时,我想从第二个div开始。我怎么能做到呢?
html,body {
height:100%;
margin:0;
}
.content {
height:100%;
min-height:100%;
}
html>body .content {
height:auto;
}
#one {
background: #ff4444;
}
#two {
background: #ff5555;
}
#three {
background: #ff6666;
}<div class='content' id='one'></div>
<div class='content' id='two'></div>
<div class='content' id='three'></div>
发布于 2015-06-09 11:37:08
发布于 2015-06-09 11:36:56
您需要在url中使用#2(第二个div的id)。
就像这
发布于 2015-06-09 11:37:17
使用它在加载时将第二个div滚动到视图:
$(function() {
$("#two")[0].scrollIntoView();
});https://stackoverflow.com/questions/30730814
复制相似问题