单击时引导程序按钮显示蓝色轮廓 [英] bootstrap button shows blue outline when clicked
本文介绍了单击时引导程序按钮显示蓝色轮廓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加了这个,但点击按钮时仍然出现蓝色轮廓.
I added this but still the blue outline appear when the button is clicked.
.btn:focus {
outline: none;
}
如何去除那个丑陋的东西?
how to remove that ugly thingy?
推荐答案
可能是您的属性被覆盖了.尝试将 !important
与 :active 一起附加到您的代码中.
May be your properties are getting overridden.
Try attaching !important
to your code along with the :active .
.btn:focus,.btn:active {
outline: none !important;
box-shadow: none;
}
还要添加 box-shadow 否则你仍然会看到按钮周围的阴影.
Also add box-shadow because otherwise you will still see the shadow around button.
虽然这不是使用 !important 的好习惯,但我建议您使用更具体的类,然后尝试使用 !important... 应用 css...
Although this isn't a good practise to use !important I suggest you use more specific class and then try applying the css with the use of !important...
这篇关于单击时引导程序按钮显示蓝色轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文