2017-02-23 72 views
1

我试过在以下几个问题提出无济于事的解决方案:如何删除单击uib-accordion标题时出现的蓝色边框?

Remove blue border from css custom-styled button in Chrome

How to remove the blue box shadow border in button if clicked

How to remove border (outline) around text/input boxes? (Chrome)

How to remove the border highlight on an input text element

Remove blue "selected" outline on buttons

Anyway to prevent the Blue highlighting of elements in Chrome when clicking quickly?

bootstrap button shows blue outline when clicked

How to get rid of blue outer border when clicking on a form input field?

在HTML我有以下几点:

<uib-accordion-heading> 
    <div id="fart1" ng-if="!contactsAccordionIsOpen" class="noSelect" style="outline: none;">Contacts<span class="glyphicon glyphicon-plus-sign pull-right"></span></div> 
    <div id="fart2" ng-if="contactsAccordionIsOpen" class="noSelect" style="outline: none;">Contacts<span class="glyphicon glyphicon-minus-sign pull-right"></span></div> 
</uib-accordion-heading> 

蓝色的轮廓没有出现围绕整个手风琴头,但周围形成的文本适合。我尝试了内联样式,通过ID和类选择,但即使使用!important,它也不会改变。

在CSS我:

#fart1:focus { 
    border: none !important; 
    outline: none !important; 
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
} 

#fart2:focus { 
    border: none !important; 
    outline: none !important; 
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
} 

.noSelect { 
    border: none !important; 
    outline: none !important; 
    outline-width: 0 !important; 
    -webkit-touch-callout: none !important; 
    -webkit-user-select: none !important; 
    -khtml-user-select: none !important; 
    -moz-user-select: none !important; 
    -ms-user-select: none !important; 
    user-select: none !important; 
} 

我也试着换outline: noneoutline: 0但它并没有改变任何东西。

链接到我的CSS文件:https://jsfiddle.net/8wnd2nz5/

编辑 - 附有图片说明一下我所说的。

Blue Outline

+0

我想我们需要一个活生生的例子在这里,既然你坚持没有什么工作。 –

+0

我无法理解您描述的是什么类型的边框。你能提供一张图片吗?根据你提到的文字个别字符的效果进行猜测,这可能是由'文字阴影'或'盒阴影'造成的。 – Gwellin

+0

只是':focus {outline:0;}'试试这个。 – cnsvnc

回答

3

解决方案

:focus {outline:0 !important;} 

此代码全部集中边框删除。

0

我认为你可以做到这一点设置元素没有的轮廓。

.element { 
    outline: none; 
} 
相关问题