问题描述
嗨,我想消除点击按钮后显示的蓝色边框,我已经尝试使用
::ng-deep{
.ngb-dp-arrow > button:active {
border: none !important;
}
但似乎没有任何效果,我已经用这种方法改变了雪佛龙的颜色,所以我将我的 css 放在正确的位置(组件本身)
复制链接:https://stackblitz.com/edit/angular-er2bdu?file=src%2Fapp%2Fdatepicker-popup.css
解决方法
您应该能够使用以下 CSS 来移除边框:
::ng-deep .ngb-dp-arrow-btn:focus {
outline: 0 !important; // remove the darker blue border
box-shadow: none !important; // remove the light blue border
}
有与该:focus
伪选择器出现2个边界:
- 深蓝色边框 - 可以通过将
outline
设置为0
来移除 - 浅蓝色框边框 - 可以通过将
box-shadow
设置为none
来移除
有关工作演示,请参阅 this Stackblitz。