当我点击其他地方时,边框消失了,我尝试使用 onfocus: none
,但这没有帮助。如何让这个丑陋的按钮边框在我点击时消失?
input[type=button] {
width: 120px;
height: 60px;
margin-left: 35px;
display: block;
background-color: gray;
color: white;
border: none;
}
<input type="button" value="Example Button">
最佳答案
使用 outline: none;
您可以在 chrome 中删除该边框。
<style>
input[type=button] {
width: 120px;
height: 60px;
margin-left: 35px;
display: block;
background-color: gray;
color: white;
border: none;
outline: none;
}
</style>
关于css - 如何从输入按钮中删除轮廓边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19886843/