3

尽可能具体,这里是......我正在尝试在一个圆圈内实现子导航,但是内容适合形状并且需要滚动条来解决这个问题。

尽管尝试使用 CSS 使其工作,但我现在遇到了一个问题。目前,子导航上的滚动条垂直滚动到圆圈外,内容似乎出来了。

请参阅下面的屏幕截图。子导航内容超出 div 太高,滚动条向下滚动。理想情况下,我希望内容位于突出显示的红色区域内,滚动条为蓝色。

截屏

滚动条的 CSS (.jb_scrollbar):

.jb_scrollbar { clear: both; margin: 0px 0 10px;}
.jb_scrollbar .viewport { overflow: hidden; position: relative; }
.jb_scrollbar .overview { list-style: none; position: absolute; left: 0; top: 0; }
.jb_scrollbar .thumb .end,
.jb_scrollbar .thumb { margin: 50px 0 0 0; background-color: #ccc; }
.jb_scrollbar.scroll_y .scrollbar { position: relative; float: right; width: 10px;}
.jb_scrollbar.scroll_x .scrollbar { position: relative; height: 15px;clear:both;margin:0 0 5px;}
.jb_scrollbar.scroll_y .track { height: 100%; width:13px; position: relative; padding: 0 1px;}
.jb_scrollbar.scroll_x .track { width: 100%; height:7px; position: relative; padding: 1px 0px;}
.jb_scrollbar.scroll_y .thumb { height: 20px; width: 13px; cursor: pointer; overflow: hidden; position: absolute; top: 0; background: #d5d089;}
.jb_scrollbar.scroll_x .thumb { height: 13px; cursor: pointer; overflow: hidden; position: absolute; left: 0; background: #d5d089;}
.jb_scrollbar.scroll_y .thumb .end { overflow: hidden; height: 5px; width: 13px; background: #d5d089;}
.jb_scrollbar.scroll_x .thumb .end { overflow: hidden; width: 5px; height: 0px; background: #d5d089;}
.jb_scrollbar .disable{ display: none;}

子导航 (#vertmenu) 的 CSS:

#vertmenu { font-family: Arial, Helvetica, sans-serif; font-size: 100%; width: 221px; height: 221px; background: url(../images/subnav_bg.png) no-repeat; margin-top: 20px; float: left;  clear: both;}
#vertmenu a.nav-path-selected{ color:#000; border-bottom: 2px solid #23b3e9; margin-bottom: -2px; }
#vertmenu a:hover{ color:#000; border-bottom: 2px solid #23b3e9; margin-bottom: -2px; }
#vertmenu ul { list-style: none; margin: 40px 0 50px 10px; border: none; float:left; height: 150px; width: 130px; }
#vertmenu ul li { margin: 0px; padding: 3px 0 3px 14px; clear: both; background: url(../images/subnav_bullet_bg.png) no-repeat left center; }
#vertmenu ul li a { font-size: 14px; line-height: 14px; text-transform: none; display: block; text-decoration: none; color: #000000;}

如果您能如此友善地帮助我发现问题,将不胜感激。多年来一直在 CSS 上摸索以正确定位它。

非常感谢

4

1 回答 1

1

我不知道如何使用该滚动条插件,但这里是一个仅使用 CSS 的快速演示:http: //jsbin.com/icelih/4/edit

该插件以内联样式设置大小,并且似乎需要大量样板标记,我不得不仔细研究(令人困惑的)文档,以了解您的网站的哪些部分以及插件插入/需要哪些部分。

因此,我创建了一个独立的模型,您也许可以使用它来修复您的网站:http: //jsbin.com/ilebaz/1/edit

于 2012-10-10T21:55:59.853 回答