2010-11-22 30 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