How to hide image broken Icon using only CSS/HTML?

前端 未结 17 1797
不思量自难忘°
不思量自难忘° 2020-11-27 09:14

How can I hide the broken image icon? Example: \"Example\"

I have an image with error src:

17条回答
  •  日久生厌
    2020-11-27 10:05

    A basic and very simple way of doing this without any code required would be to just provide an empty alt statement. The browser will then return the image as blank. It would look just like if the image isn't there.

    Example:

    
    

    Try it out to see! ;)

提交回复
热议问题