让Firefox显示无效图片

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

broken-image

开发人员在coding的时候,难免会遗漏掉这些细节。所以,最好能够让Firefox别那么智能,还是正常显示出无效图片吧。

解决方案:

在C:\Documents and Settings\用户名\Application Data\Mozilla\Firefox\Profiles\不固定字符串.default\chrome,新建一个userContent.css。内容如下:

/*
*显示缺失图像占位符
*/
@-moz-document url-prefix(http), url-prefix(file)
{
img:-moz-broken
{
-moz-force-broken-image-icon: 1 !important;
width: 24px;
height: 24px;
}
}

重启浏览器即可生效。

补充:使用 Windows 7 的用户请前往 C:\Users\用户名\AppData\Roaming\Mozilla\Firefox\Profiles\不固定字符串.default\chrome

无觅相关文章插件,快速提升流量

This entry was posted in Programming and tagged , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">