问题来了,我有一个输入字段,我设置了:
outline: none !important;
在 Chrome 中,当我输入一些字母时,它工作正常。但是,当我在 Firefox 中测试它时,出现了紫色的焦点边框。
如何禁用它?
这是 html 文件:
<html>
<head>
<style type="text/css">
.input-large{
position: absolute;
width: 800px;
margin: 0 auto;;
background: transparent;
font-size: 150px;
text-align: left;
border: 0;
letter-spacing: 35px;
outline: none !important;
font-family: Courier New !important;
}
</style>
</head>
<body>
<input class="input-large" type="text" pattern="[0-9]*" maxlength="5" size="5" autofocus>
</body>
</html>
最佳答案
input {
-moz-box-shadow: none;
}
在 mozilla firefox 中将输入框阴影设置为无。 尝试使用它,它对我来说效果很好。
关于html - 输入字段焦点在 Chrome 和 Firefox 中的不同行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18247028/