简体   繁体   English

如何在Firefox中删除超链接图像周围的边框

[英]How to remove border around hyperlink image in Firefox

I can not remove these border from my hyperlink image: 我无法从超链接图像中删除这些边框:
1个
I tried: 我试过了:

a img {border: none}

img {border: none}

a {border: none}

* {
    outline: none;
    border: none
}

I tried border: 0; 我尝试了border: 0; too. 太。 But it's not working. 但这不起作用。 Tested on Windows 7 Ultimate using Firefox 35. 使用Firefox 35在Windows 7 Ultimate上进行了测试。
Demo 演示版
Hard reload if you can't see it. 如果看不到,则进行硬重装。

The displayed placeholder in img tags for broken links is controlled by the browsers, and the border may be included in the placeholder image (or not, but that's not the point). img标签中显示的断开链接的占位符由浏览器控制,边框可能包含在占位符图像中(或不包含,但这不是重点)。

In this case, you just can't do anything about this border (but avoid broken links). 在这种情况下,您不能对此边框做任何事情(但要避免断开链接)。

Your CSS is not best practice and could be throwing off the browser. 您的CSS并非最佳做法,可能会抛弃浏览器。 Make sure you end each line with a semicolon ; 确保以分号结尾每行;

a img { border: none; }

img { border: none; }

a { border: none; }

* {
    outline: none;
    border: none;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM