带有内容 div 的浮动菜单
好吧,总的来说,我想要得到的效果是这样的 web 到目前为止我能找到并应用的是这个 教程网 tuts 现在我更改了 css,使其显示水平,但由于某种原因菜单位于文本顶部,我需要的是第一个始终显示菜单但将内容放在下面的网站。而且它有一个平滑的滚动,我假设它使用 Jquery。好吧,任何指点都会非常感激。
Ok overall the effect I am trying to get is like this web
what I've been able to find so far and applied is from this tutorial net tuts
Now I changed the css so it shows horizontal but for some reason the menu is on top of the text and what I need is like the first site to show menu always on top but put content underneath. Also it has a smooth scroll which i'm assuming it uses Jquery for it. Well any pointers would be more than appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您发布目前为止拥有的 CSS 可能会有所帮助。我的两分钱?您的元素似乎没有正确配置位置属性(或者您有一些奇怪的 HTML 流问题)。
首先尝试在纸上勾画出所需结果的“盒子模型” - 这是设计师要做的第一件事,它可以帮助他们可视化他们正在构建的东西!
It might help if you post the CSS you have so far. My two cents? It looks like your elements aren't properly configured with the position property (or you have some funky HTML flow issues).
Try sketching out a "box model" of the desired outcome on paper first - this is the first thing designers do and it helps them visualize what they're building!
好吧,想明白了..我想它现在可以用了..我在教程中采用了相同的理论,更改了CSS,使其水平,然后在它滚动到的每个div上我添加了一个具有padding-top的“subdiv” :60px 这样它会在该部分的顶部显示菜单并且不会切断该顶部部分。感谢它确实有助于将其绘制在纸上,我倾向于在脑海中做事并直接进行编程:)
Ok figured it out..i guess well it works for now..I took the same theory for the tutorial, changed the css so it's horizontal, then on each div that it scrolls to I added a "subdiv" that has padding-top:60px and this way it shows the menu on top of the section and doesn't cut off that top part. Thanks it did help mapping it out on paper, I tend to do things in my head and go straight to the programming :)