如何重置/删除 chrome 的输入突出显示/焦点边框? [英] How to reset / remove chrome's input highlighting / focus border?

查看:25
本文介绍了如何重置/删除 chrome 的输入突出显示/焦点边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到 chrome 在 :focus 上放置了一个更粗的边框,但在我使用 border-radius 的情况下,它看起来有点不对劲.有没有办法删除它?

I have seen that chrome puts a thicker border on :focus but it kind of looks off in my case where I've used border-radius also. Is there anyway to remove that?

推荐答案

您应该可以使用

outline: none;

但请记住,这可能不利于可用性:很难判断元素是否获得焦点,当您使用 Tab 键遍历表单的所有元素时,这会很糟糕 - 您当一个元素被聚焦时应该以某种方式反映.

but keep in mind this is potentially bad for usability: It will be hard to tell whether an element is focused, which can suck when you walk through all a form's elements using the Tab key - you should reflect somehow when an element is focused.

这篇关于如何重置/删除 chrome 的输入突出显示/焦点边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆