在样式中编写如下: margin: 0; padding: 0; border: 1px solid transparent; //自定义边框 outline: none; //消除默认点击蓝色边框效果 即可解决