问题
I have recently started building a website and have started to make buttons on it. However, whenever I click the button, I get a blue border like this !
How should I get rid of this border? Thanks in advance!
回答1:
Add this css to your button:
outline: none;
回答2:
Just add :
button:focus {
outline: none;
}
回答3:
The way to remove this is to add this to the css of the button:
outline: 0;
If you don't want that line anywhere add this to your css:
* {
outline: 0;
}
回答4:
just add outline: none;
here's an example
#button
{
width: 10px;
height: 10px;
z-index: -1;
outline: none;
}
来源:https://stackoverflow.com/questions/22435457/how-to-remove-border-around-clicked-button-in-html