我已尝试以下问题中提出的解决方案但无济于事:
从 Chrome 中的 css 自定义样式按钮中删除蓝色边框 https://stackoverflow.com/questions/20340138/remove-blue-border-from-css-custom-styled-button-in-chrome
如果单击,如何删除按钮中的蓝色框阴影边框 https://stackoverflow.com/questions/24222798/how-to-remove-the-blue-box-shadow-border-in-button-if-clicked
如何删除文本/输入框周围的边框(轮廓)? (铬合金) https://stackoverflow.com/questions/3397113/how-to-remove-border-outline-around-text-input-boxes-chrome
如何删除输入文本元素上的边框突出显示 https://stackoverflow.com/questions/1457849/how-to-remove-the-border-highlight-on-an-input-text-element
删除按钮上的蓝色“选定”轮廓 https://stackoverflow.com/questions/20593224/remove-blue-selected-outline-on-buttons
无论如何,要防止快速单击时 Chrome 中的元素蓝色突出显示? https://stackoverflow.com/questions/21003535/anyway-to-prevent-the-blue-highlighting-of-elements-in-chrome-when-clicking-quic
单击时引导按钮显示蓝色轮廓 https://stackoverflow.com/questions/23333231/bootstrap-button-shows-blue-outline-when-clicked
单击表单输入字段时如何摆脱蓝色外边框? https://stackoverflow.com/questions/7648898/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: none
for outline: 0
但这并没有改变任何事情。
链接到我的 CSS 文件:https://jsfiddle.net/8wnd2nz5/ https://jsfiddle.net/8wnd2nz5/
编辑--附上一张图片来说明我所指的内容。