文档准备好后如何将 fancybox 图像加载到浏览器缓存中?
我有一个包含十个锚定缩略图和一些事实的列表,当您单击缩略图时,Fancybox 窗口中会弹出一个整页图表。第一次单击任何特定缩略图时,会出现延迟,因为它将图像加载到缓存中。
如何将链接中的所有图像预加载到浏览器缓存中,以便它们在第一次单击时立即弹出到 Fancybox 中?
I have a list of ten anchored thumbnails and some facts, and when you click a thumbnail a full page chart pops up in a Fancybox window. There is a delay the first time you click any specific thumbnail as it loads the image into the cache.
How can I pre-load all of the images from the links into the browser cache so that they pop up instantly into a Fancybox the first time they are clicked?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过创建一个不可见的 div 并包含 Fancybox 所需的所有图像来做到这一点。当文档准备就绪时,您就创建了这个 div。
You can do that by creating a div not visible and containing all images that Fancybox require. And you create this div when doc is ready for sure.