带有选项卡时如何从Firefox中的iframe中删除虚线轮廓 [英] How to remove dotted outline from iframe in Firefox when tabbed

查看:79
本文介绍了带有选项卡时如何从Firefox中的iframe中删除虚线轮廓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Firefox中的iframe中删除虚线轮廓?

Is it possible to remove the dotted outline from an iframe in Firefox?

在CSS中设置outline属性无效.

Setting the outline property in CSS doesn't work.

HTML:

<iframe width="50" height="50"/>

CSS:

iframe { outline: 0 }

这是一个重现此问题的jsfiddle. http://jsfiddle.net/6sHkw/1/

Here's a jsfiddle that reproduces this issue. http://jsfiddle.net/6sHkw/1/

修改

对不起,我不清楚我的问题.

Sorry guys, I wasn't clear with my question.

使用上述jsfiddle,如果您使用Tab键浏览iframe,则会显示虚线轮廓.我要这样做,以便在点按时不显示虚线轮廓. border:0和frameborder = 0都不起作用.

With the above jsfiddle, the dotted outline appears if you tab to the iframe. I would like to make it so that the dotted outline does not appear when you tab to it. Neither border: 0 nor frameborder=0 works.

推荐答案

虚线焦点轮廓位于iframe内的文档中,而不是iframe本身.您也可以在主浏览器视口中看到相同的内容.

The dotted focus outline is in the document inside the iframe, not on the iframe itself. You can see the same thing with the main browser viewport as well.

我不认为您可以通过样式将其关闭.这是一个可访问性功能:如果人们使用选项卡导航,则假定他们想实际查看他们在选项卡顺序中的位置.否则,它将很快变得完全无法使用.

I don't believe you can turn it off via styles. It's an accessibility feature: if people are using tab navigation the assumption is that they want to actually see where they are in the tab order. Otherwise it quickly gets completely unusable.

这篇关于带有选项卡时如何从Firefox中的iframe中删除虚线轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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