Remove blue border from css custom-styled button in Chrome

前端 未结 22 1238
闹比i
闹比i 2020-11-22 17:10

I\'m working on a web page, and I want custom-styled

22条回答
  •  无人共我
    2020-11-22 17:20

    Use either this:

    :active {
        outline:none;
    }
    

    or this if that doesn't work:

    :active {
       outline:none !important;
    }
    

    This works for me (FF and Chrome, at least). Instead of targeting the :focus state, just target the :active state and that will remove the aesthetically obtrusive highlighting in your browser when a user clicks a link. But it will still retain the focus states when a user with disabilities tabs or shift-tabs through a page. Both parties are happy. :)

提交回复
热议问题