css - css为什么点击按钮后有边框?
问题描述
当我单击按钮时,会显示一个边框。我怎样才能删除这个边界,为什么它在那里?
这是CSS代码:
.operator button {
margin: 3px;
/*height: 25px;
width: 25px;*/
border-radius: 50%;
background-color: green;
border: none;
font-size: 10px;
padding: 12px 12px;
border: 2px solid #4CAF50;
transition-duration: 1s;
text-align: center;
display: inline;
}
[这是一张图片1
解决方案
添加outline: 0;
您的button:focus
:
.operator button {
margin: 3px;
/*height: 25px;
width: 25px;*/
border-radius: 50%;
background-color: green;
border: none;
font-size: 10px;
padding: 12px 12px;
border: 2px solid #4CAF50;
transition-duration: 1s;
text-align: center;
display: inline;
}
.operator button:focus { outline: 0; }
<div class="operator">
<button>Test</button>
</div>
推荐阅读
- wso2is - 重置密码重定向到 myaccount 无法按预期工作
- reactjs - 仅从 API 获取数据一次并在客户端过滤
- loops - 如何在 Pentaho ETL 中执行 FOR I in.. 循环
- vb.net - Visual Basic 中的矩阵求逆
- wpf - 列表框在运行时从后面的代码修改项目的数据模板
- java - 由于 java.io.IOException,Zookeeper 异常导致会话 0x176feb5260f1008e 关闭:Len 错误 1101988
- .net - Dotnet core-如何从 IQueryable 获取选择器字符串?
- c# - SIMD指令集有宏吗?
- react-native - 如何在 react-native 中获得正确的 ColorScheme?
- python - 如何以字典方式逐项比较两个二维数组?