我希望在我的网站上放置水平鱼眼/停靠导航,但我需要它固定定位...我发现的所有导航都不支持固定定位。
以下是我找到的一些链接:
我还没有看到一个不会中断的水平链接,有一个垂直链接可以与上面的第一个链接在同一页面上工作。
有人知道任何可用于固定定位的鱼眼/停靠菜单吗?
编辑:将定位更改为固定将特别破坏这些菜单的功能(他们甚至在上面第一个链接的文章中说了这一点)。 我正在寻找一种即使将位置更改为固定也不会损坏的产品。
I'm looking to put a horizontal fisheye/dock nav on my site, but I need it to be fixed positioning... all the ones I've found do not support fixed positioning.
Here are links to some of the ones I've found:
- jQuery OS X Dock #1 - Doesn't support fixed positioning
- CSS Dock Menu - This is very similar to the one above...
- euDock 2.0 - Supports similar to fixed positioning (position:absolute with javascript to make sure it stays in the same place) but this doesn't work because it's way too jumpy when you scroll down (See what I mean by going to that link and scrolling)... real fixed position is usually perfectly smooth with scrolling.
I've yet to see a horizontal one that doesn't break, there is a vertical one that works on the same page as the first link above.
Anyone know any fisheye/dock menu that will work with fixed positioning?
Edit: Changing the positioning to fixed will break the functionality of these menus in particular (they even say it in the article in the first link above). I'm looking for one that won't break if I change the positioning to fixed.
发布评论
评论(5)
可以用CSS来完成固定定位。
我还没有使用过任何这些鱼眼 JavaScript 的东西,但我认为它们可以处理固定元素。
Fixed positioning can be done with CSS.
I haven't used any of these fisheye javascript things, but I presume they'll work with fixed elements.
修改界面的iutil.js,显示减法scrollTop
Modify iutil.js of interface, you show subtract scrollTop
您可以使用此补丁修补 jQuery 接口 Fisheye。 然后 Fisheye 与
position:fixed;
一起使用,请参阅:
http://www.monkey-business.biz /181/jquery-interfaces-fisheye-position-fixed-patch/
You can patch the jQuery interfaces Fisheye with this patch. Then Fisheye works with
position: fixed;
see:
http://www.monkey-business.biz/181/jquery-interfaces-fisheye-position-fixed-patch/
更多开箱即用的解决方案,以避免重新发明轮子(当然,如果许可证允许)
http://www.ndesign-studio.com/blog/mac/css-dock-menu
Some more solutions out-of-the-box to avoid re0inventing the wheel (of course, if license allows)
http://www.ndesign-studio.com/blog/mac/css-dock-menu
我建议您尝试这个。
为什么不将导航栏放在一个 div 中,将内容放在另一个 div 中,并自动溢出? 然后导航栏始终位于顶部。
就像这里: http://www.pmob.co.uk/temp/fixed -标题.htm
I suggest you try this one.
Why don´t you get your navigation bar in one div, and the content in another div, with overflow auto? Then the navibar is always on top.
Like here: http://www.pmob.co.uk/temp/fixed-header.htm