简体   繁体   English

如果单击按钮,如何删除按钮中的蓝色框阴影边框

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

I want to do is remove the button blue box shadow effect in my class btnd if the button is click. 我想要做的是在我的班级btnd中删除按钮蓝框阴影效果,如果按钮是单击。

current output : 电流输出

i tried this but it doesnt work. 我试过这个,但它不起作用。

.btnd:active,
.btnd.active {
  background-image: none;
  outline: 0;
  -webkit-box-shadow: none;
          box-shadow: none;
}

Blue shadow is browser default :focus state 蓝色阴影是浏览器默认值:焦点状态

.btnd:active,
.btnd:focus,
.btnd:focus:active {
  background-image: none;
  outline: 0;
  box-shadow: none;
}

I deal with this problem just yesterday. 我昨天才处理这个问题。 You need: 你需要:

.btnd:focus, .btnd:active, .btnd.active, .btnd:focus:active {
  background-image: none;
  outline: none;
  -webkit-box-shadow: none;
  box-shadow: none;
}

The key is in last selector .btnd:focus:active . 键位于最后一个选择器.btnd:focus:active

只需使用此行删除焦点$(“#OK”).button()。blur();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM