滚动时在页面侧面显示菜单 [英] Show Menu in the side of the page while scrolling

查看:72
本文介绍了滚动时在页面侧面显示菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网页的侧面或顶部显示我的菜单.
这样,当我滚动页面时,它对我可见.
(就像在Crystal Xp样式菜单中显示在顶部或侧面).

I want to show my Menu in the side or Top of the web page.
Such that when I scroll the page, it is visible to me.
(Like in Crystal Xp style menu show on the Top or sides)

推荐答案

如果您的网站访问者使用IE6,则他们在CallCallMeMrJames答案中使用的CSS定位将不起作用.


另一种解决方案是使用javascript滚动带有页面的菜单.

将菜单放在div中,并使用在此页面上找到的javascript:

http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm [ http://net.tutsplus .com/tutorials/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/ [
If your site visitors use IE6 the CSS positioning used in the answer by TheyCallMeMrJames will not work.


An alternative solution is to use javascript to scroll the menu with the page.

Place your menu in a div and use the javascript found on this page:

http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm[^]

or use jQuery

http://net.tutsplus.com/tutorials/html-css-techniques/creating-a-floating-html-menu-using-jquery-and-css/[^]


创建一个DIV元素以包含菜单,然后使用CSS将位置设置为fixed. 查看示例 [
Create a DIV element to contain your menu, then use CSS to set the position to fixed. See a sample[^].

Cheers.


这篇关于滚动时在页面侧面显示菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆