(CSS?)消除超链接图像周围浏览器的“选定”行? [英] (CSS?) Eliminating browser's 'selected' lines around a hyperlinked image?

查看:168
本文介绍了(CSS?)消除超链接图像周围浏览器的“选定”行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

附加的屏幕截图来自OS X / Firefox 3.请注意,中心标签(图像)在其周围有一个虚线,显然是因为它是最近选择的标签。有没有办法,我可以消除这个虚线在CSS或JavaScript? (嗯...免费图片托管服务已经减少了图像的大小,但如果你能看到它,你会注意到一个虚线框选择区域周围。)

The attached screenshot is from OS X/Firefox 3. Note that the center tab (an image) has a dotted line around it, apparently because it was the most-recently selected tab. Is there a way I can eliminate this dotted line in CSS or JavaScript? (Hmmm...the free image hosting service has reduced the size of the image. But if you could see it, you'd notice a dotted-line select area around the block.)

推荐答案

您将要添加以下行到您的css:

You'll want to add the following line to your css:

a:active, a:focus { outline-style: none; -moz-outline-style:none; }

(假设你的选项卡是使用a元素完成的,当然。)

(Assuming your tabs are done using the a element, of course.)

根据其他人的要求,对于未来的观众,应该注意到,大纲对于键盘导航器是至关重要的,因为它指定了您的选择, ,给出一个提示,你的下一个选项卡可能去。因此,删除此虚线选择是不合适的。但如果您认为有必要,了解您的操作方式仍然有用。

只处理FF> v1.5,随意省略-moz-outline-style:none;

这篇关于(CSS?)消除超链接图像周围浏览器的“选定”行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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