<img src="Error.png" alt="How to hide image broken Icon using only CSS/HTML?"/>
img { position: relative; }
/* style this to fit your needs */
/* and remove [alt] to apply to all images*/
img:after { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #fff; font-family: 'Helvetica'; font-weight: 300; line-height: 2; text-align: center; content: attr(alt); }
No comments:
Post a Comment