2010-11-22 29 views
11

活生生的例子蓝色边框:http://www.legodata.com/kc/kc.html上JScrollPane的DIV

我有与JScrollPane的边框显示的问题,你会知道使用哪个CSS规则删除这条边界?

单击其内部时,它会在jScrollPane div周围显示蓝色边框,在jScrollPane div外部单击时会消失(有时)。

它看起来像这样:

alt text

这是当前CSS:

background-color: transparent; 
border-bottom-width: 0px; 
border-left-width: 0px; 
border-right-width: 0px; 
border-top-width: 0px; 
bottom: auto; 
color: #999E92; 
display: block; 
float: right; 
font-family: VerdanaArial, Helvetica, sans-serif; 
font-size: 16px; 
height: 802px; 
left: auto; 
margin-bottom: 0px; 
margin-left: 0px; 
margin-right: 0px; 
margin-top: 0px; 
overflow-x: hidden; 
overflow-y: hidden; 
position: relative; 
right: auto; 
top: auto; 
visibility: visible; 
width: 200px; 
z-index: 1; 

我可以重现的铬和Safari(在其他地方未测试)这个问题。

+2

它不可能从你的CSS你给您解答。我活的例子将有助于更多 – Sotiris 2010-11-22 11:26:54

+0

现场示例:http://www.legodata.com/kc/kc.html – Alex 2010-11-22 11:37:10

回答

14

尝试增加outline: none;到你的CSS

+0

谢谢,这是工作。 – Alex 2010-11-22 14:46:50

+1

这对我有用$(element).jScrollPane({hideFocus:true}); – 2016-03-02 15:36:32

3

outline: none;的工作,但请注意,这是在Chrome,FF和Safari默认浏览器行为,将很难为弱视人群浏览您的网站。确保只将其添加到页面上的不可导航元素。

选项+标签

看到显示屏幕阅读器,等您的网站的导航结构,这也将展示的轮廓显示在您的其他元素! :)

1

所有你需要做的就是在你的CSS中添加以下行。

.jScrollPaneContainer{ 
    outline: 0 none; 
} 
21

当初始化JScrollPane中,使用参数:

hideFocus: true 

对于前:

$('.scroll-pane').jScrollPane(
{ 
    autoReinitialise: true, 
    hideFocus: true 
}); 
+1

感谢您的答案.. – RameshVel 2012-02-17 11:04:51