How to remove black border around hyperlinked image?

后端 未结 5 1101
萌比男神i
萌比男神i 2021-01-04 00:26

When I turn an image () into a hyperlink (by wrapping it in ), Firefox adds a black border around the image. Safari does not d

相关标签:
5条回答
  • 2021-01-04 00:40

    Just add:

    border: 0;
    

    or:

    a img {
      border: 0;
    }
    

    to remove border from all image links.

    That should do the trick.

    0 讨论(0)
  • 2021-01-04 00:48
    img {
        border: 0
    }
    

    Or old-fashioned:

    <img border="0" src="..." />
         ^^^^^^^^^^
    
    0 讨论(0)
  • 2021-01-04 00:49
    a img {
        border-width: 0;
    }
    
    0 讨论(0)
  • 2021-01-04 01:00

    in the code use border=0. so for example:

    <img href="mypic.gif" border="0" />
    

    within css

    border : 0;
    

    under whatever class your image is.

    0 讨论(0)
  • 2021-01-04 01:03

    Try this:

    img {
      border-style: none;
    }
    
    0 讨论(0)
提交回复
热议问题