0
我需要你的帮助。链接到同一页上的位置不匹配
我做了一个导航栏,链接到锚点位置在同一页面上,允许查看端口向下滚动时单击(没有什么复杂的)。
问题:在使用网页过渡并缩小高度为0的顶部有一个很大的封面页。导航链接认为有一个大页面并向下滚动太多。
有没有人有解决方案?也许Jquery检测scrollTop()并使用if语句来调整/偏移()的位置?
这里是链接:[www.imbenton.com] [1]
代码:
----------- CSS ------ ----
#cover img{
max-width: 90%;
padding: 300px 0 600px 0;
margin: 0 auto;
-webkit-transition: all 0.8s ease-out;
-moz-transition: all 0.8s ease-out;
-ms-transition: all 0.8s ease-out;
-o-transition: all 0.8s ease-out;
transition: all 0.8s ease-out;
}
#cover img.alt{
background: url("dvsup.png") repeat fixed;
max-width: 0%;
padding: 100px 0;
margin: 0 auto;
}
nav {
position: fixed;
width: 100%;
top: 173px;
padding: 0px 0 5px 0;
text-align: center;
height: auto;
-webkit-transition: all 0.8s ease-out;
-moz-transition: all 0.8s ease-out;
-ms-transition: all 0.8s ease-out;
-o-transition: all 0.8s ease-out;
transition: all 0.8s ease-out;
z-index: 999;
}
nav.still{
position: fixed;
top: -980px;
padding-top: 900px;
background: url("dvsup.png") repeat fixed;
}
谢谢。不好的经历啊......我怎么能让它变得更好? quickleft.com有一个类似的横幅。如果我做一个覆盖,经验更糟糕,因为它隐藏了重要的内容。 –
好,如果你的网页是华而不实,然后离开,只是试图修复高度的事情。我将不得不花一些时间来看代码 – Huangism