在Firefox中加载图像时显示边框和标题 [英] Border and Title showing while Image loading in Firefox

查看:74
本文介绍了在Firefox中加载图像时显示边框和标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对firefox有问题.在我的网站上,我有很多图片.当我浏览Firefox中的页面时,在加载图像时可以看到边框和图像标题.下载完成后,该边框/标题消失,并替换为图像.

I have a problem with firefox. On my website I have many images. When I browse through pages in Firefox, border and image title is visible while image is loading. Once it finishes downloading, this border/title disappears and is replaced with an image.

这仅在Firefox中发生. Chrome和其他浏览器加载的图像没有边框和标题,看上去干净"得多.换句话说,firefox产生的这些边界很难看.

This happens only in firefox. Chrome and other browsers load images without any borders and titles which looks much 'cleaner'. In words, these borders produced by firefox are ugly.

我可以删除它,用装载机或类似的东西代替吗?我尝试使用background-image:url()添加css加载器...以为这些边界不可见,但是它们仍然存在.

Can I remove that, replace with an loader or something of this sort? I tried adding css loader with background-image:url()... thinking these borders won't be visible, however, they are still there.

pinterest,滴灌等网站如何在Firefox中生成图像而又不产生边框?

How do sites like pinterest, dribbble and others deliver images without producing border in firefox?

谢谢

推荐答案

您可以使用

You can use the :-moz-loading psuedo-class to set it to not appear. Something like this should work:

img:-moz-loading {
    visibility: hidden;
}

一种替代方法是使用AJAX加载脚本,它将在后台加载图像并显示加载对话框或动画.有很多技术可以做到这一点,在此处或在Google上进行搜索应提示许多如何有效执行此操作的结果.

An alternative to this is something like an AJAX loading script, which will load the image in the background and display a loading dialog, or animation. There are a lot of techniques for doing this, and searching here or on Google should prompt many many many results on how to do this effectively.

这篇关于在Firefox中加载图像时显示边框和标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆