FireFox默认隐藏无效图片(broken image),而不是像IE中那般,显示一个红X

直接上代码:

<style type="text/css">
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(http), url-prefix(file){
	div[class="postmessage defaultpost"] { overflow: visible !important;}
		img:-moz-broken{
		-moz-force-broken-image-icon:1;
		width:125px;
		height:118px;
	}
}

</style>

 

其实更多的时候我们可以换一个思路,设置一个默认图片

你可能感兴趣的:(图片,火狐)