我注意到,如果单击我网站上的按钮(如下例所示),按钮周围会显示一个渐变边框。我尝试了多种浏览器,但这仅在 Google Chrome 中显示。
有没有办法删除这个 CSS wize?
最佳答案
您可以使用 outline:none
禁用大纲。
input,
select,
textarea,
button {
outline: none;
}
为了保证焦点状态的安全:
input:focus,
select:focus,
textarea:focus,
button:focus {
outline: none;
}
但是,有些人认为由于可访问性问题禁用大纲不是一个好主意 (http://outlinenone.com/)
关于html - 单击渐变边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20685462/