2014-02-27 10 views
0

这里我使用的是Oracle ADF。 我的按钮样式如下:如何在ADF中使用-moz-focus-inner去除firefox中按钮的虚线轮廓

af|commandButton:text-only { 
    background-image: none; 
    width: auto; 
    height: 30px; 
    border: 1px solid #c4ced7; 
    border-radius: 2px; 
    font-size: 12px; 
    font-weight: bold; 
    color: #000000; 
    text-align: center; 
    padding: 2px 10px 3px 10px; 
} 

af|commandButton:text-only:focus { 
    background-image: none; 
    width: auto; 
    outline: none; 
    height: 30px; 
    border: 1px solid #c4ced7; 
    border-radius: 2px; 
    font-size: 12px; 
    font-weight: bold; 
    color: #000000; 
    text-align: center; 
    padding: 2px 10px 3px 10px; 
} 

删除焦点大纲使用:;如CSS代码段规定“大纲没有”。 现在,焦点大纲在除Firefox以外的所有浏览器中都被删除。 根据诊断,我发现Firefox使用“-moz-focus-inner”来呈现轮廓。

我在CSS中尝试了以下两种方式,但没有运气。

第一种方式:

button::-moz-focus-inner { 
    border: 0; 
} 

方式二:

af|commandButton:text-only:focus::-moz-focus-inner, 
af|commandButton:focus::-moz-focus-inner { 
    border:0; 
} 

如何指定 “-moz-焦点内” 的ADF的风格?

回答

0

我和我的xul程序有同样的问题。关键是,按钮中隐藏了一些隐藏的DOM,它具有虚线边框。

这是我如何做它的工作:

button *, button:focus * 
{ 
    border: 0; 
} 

请记住,该按钮中的元素具有透明边框当按钮是不是在:集中状态。因此,您既可以清除它们,也可以将边框设置为透明:焦点。

希望对你有所帮助