有趣的问题!
通过检查元素检查按钮并触发a:focus时,我注意到,按钮获取样式轮廓:-webkit-focus-ring-color auto 5px ;.
这不会在按钮上创建一个轮廓. (这可能是因为Mac上的Chrome,因为Tabing也不会创建一个大纲)
当我将这个添加到样式表单中的按钮而不是添加的大纲时,它不会得到你在Tab键通过时得到的蓝色阴影.如果你问我,这很奇怪当我google -webkit-focus-ring-color时,我来到了this question on SO.在那个答案中,他写了一些关于[NSColor keyboardFocusIndicatorColor]的内容,它真正谈论了键盘焦点(tabbing through the form),而不是鼠标焦点.
当谷歌搜索一些焦点指标时,我登陆了维基百科页面Focus (computing),其中包含以下文字:
By convention,the tab key is used to move the focus to the next focusable component and shift + tab to the prevIoUs one. When graphical interfaces were first introduced,many computers did not have mice,so this alternative was necessary. This feature makes it easier for people that have a hard time using a mouse to use the user interface.
这告诉我,按钮的重点只能显示一个键盘按钮,因为一开始需要显示什么元素的重点,而现在用鼠标,这是清楚的是什么是专注,因为你正在积极地移动鼠标到按钮.