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

前端 未结 17 1744
不思量自难忘°
不思量自难忘° 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 09:56

    The same idea as described by others works in React as follow:

     e.target.style.display='none' }/>
    

提交回复
热议问题