在移动网站上,顶部有一个导航栏。导航栏位置由position :absolute组成:
.navbar-fixed-top{position:absolute;right:0;left:0;z-index:1000;当向下移动时,导航栏应该是不可见的,当向上移动时,导航栏应该再次可见。在网络上有很多例子如何在桌面上做他的滚动,例如:
http://jsfiddle.net/mariusc23/s6mLJ/31/
http://codepen.io/sunnyxyst/pen/DwgFm
Jquery sticky nav only when scrolling up
这个例子在移动设备上不起作用。
谢谢你的帮助。我无法使用Bootstrap。
发布于 2015-01-28 03:03:10
它使用
jsfiddle.net/mariusc23/s6mLJ/31/
重要的是有一部android > 2的智能手机,因为我们需要position:fixed
https://stackoverflow.com/questions/28165562
复制相似问题