html中为什么tab展开不了,html – 为什么伪元素:使用TAB时不要点击?

有趣的问题!

通过检查元素检查按钮并触发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.

这告诉我,按钮的重点只能显示一个键盘按钮,因为一开始需要显示什么元素的重点,而现在用鼠标,这是清楚的是什么是专注,因为你正在积极地移动鼠标到按钮.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值