破碎的图像图标删除

时间:2018-06-13 13:11:03

标签: css internet-explorer

我试图摆脱破碎的图像图标。我发现了一个适用于chrome和firefox的解决方案。当我在IE中打开页面时没有任何反应。

任何人都可以帮助我吗?这是一个jsfiddle。

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: #999;
  content: attr(alt);
} 
<img src="broken" alt="A broken image">`

https://jsfiddle.net/nLsv2yh1/7/

0 个答案:

没有答案
相关问题