当img标签上的图片不能正常显示时,会默认显示alt标签的文字,挺丑的;
img {
/* Same as first example */
}
做以下修改:
<style>
img:after {
content: "☺" " " attr(alt);
font-size: 16px;
font-family: FontAwesome;
color: rgb(100, 100, 100);
display: block;
position: absolute;
z-index: 2;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #fff;
}
</style>
<img src="01_d56c756b2.png" alt="图片不见啦" />