UL CSS 边框问题
我正在拼命寻找一种方法来使其发挥作用。我有一个使用图像作为链接的菜单。但在 IE 和 FF 中,图像周围有一个恼人的边框,我不知道如何去掉。
你能快速告诉我 CSS 属性以避免这种影响吗?
预先感谢您的宝贵时间。
安东尼奥
I am desperately trying to find a way to get this working. I have a menu that use images for links. But in IE and FF there is an annoying border around the image that I don't know how to get rid of.
Would you be able to quickly tell me the CSS attribute to avoid this effect.
Thanks in advance for your time.
Antonio
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您正在谈论添加到
a
标记内的img
元素的隐式outline
或border
。修复方法很简单:
outline
可能不再需要,我不确定是否还有浏览器使用outline
来实现效果。编辑添加:
由于 FF/IE 中的某些原因,
img
或a
的特异性太低,无法覆盖默认行为。I believe you are talking about the implicit
outline
orborder
that are added toimg
elements withina
tags.The fix is simple:
The
outline
may no longer be necessary, I'm not sure if any browsers useoutline
for the effect any more.Edit to add:
For some reason in FF/IE, the specificity of
img
ora
is too low to override the default behavior.