<分区>
我搜索了所有地方,但找不到解决方案,当用户向下滚动时,网站的菜单选项会发生变化。有谁知道如何做到这一点(最好是在 Foundation 中)?
最佳答案
您的问题非常广泛 - 您可能想解释您想要的内容。但是我认为您可能正在寻找“粘性”标题效果,例如:http://themenectar.com/demo/salient/ ?
如果是这种情况,Foundation 论坛上的这篇帖子 ( http://foundation.zurb.com/forum/posts/18987-sticky-header-effect) 提到您可以使用类 'sticky' 来实现相同的效果。
In Foundation the same effect can be achieved by wrapping the navbar in a div class="sticky".
As soon as an element with the "sticky" class hits the top of the viewport it gets the class "fixed", which takes care of the positioning. You can also use this class to resize the "stuck" navbar etc.
关于html - 向上/向下滚动时菜单/顶部栏发生变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36392953/