简体   繁体   中英

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; too. But it's not working. Tested on Windows 7 Ultimate using Firefox 35.
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).

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. Make sure you end each line with a semicolon ;

a img { border: none; }

img { border: none; }

a { border: none; }

* {
    outline: none;
    border: none;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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