问题
I tested the below code but gain no success:
input[type="text"]:focus, input[type="password"]:focus {
outline:none;
-moz-transition: box-shadow 0.3s ease-out 0s;
background-clip: padding-box;
border: 1px solid #B6B6B6;
border-radius: 3px 3px 3px 3px;
color: #404040;
font-size: 16px;
height: auto;
line-height: 16px;
padding: 10px;
}
Is there something here I'm missing?
回答1:
Opera applies a yellow outline to form inputs that have saved login information. I don't think it is possible to override it with CSS.
回答2:
Instead of using outline:none; try using border:0; given outline:none ll create cross-browser problem...
回答3:
add this in your css which u are using
textarea:focus {
outline-width: 0;
}
回答4:
for me it worked with that addition on Opera/Safari/Chrome
input:focus {
outline: 0 none;
}
来源:https://stackoverflow.com/questions/10327162/how-to-remove-textbox-outline-in-opera