在 CC 之前预加载图像 - per souders
我看到了 steve souders 的 PPT,内容是关于在 css 之前加载图像,以适应我需要的类似情况……但我不清楚执行此操作的实际代码是什么。我假设他在 css 之前加载了一些东西,并且在他的 ppt 中说了这一点
new Image().src = "http://webcelerity.com/blog/wp-content/themes/carrington-blog-faster/images/sprite.png
,但如果有人可以向我展示文档头实际上是什么样子,那就太棒了
; 这里是 ppt,
提前感谢您的帮助
I saw a PPT from steve souders about loading images before the css for a similar situation that i need.... but im not clear on what the actual code is to do this. I assume he loaded something before the css and in his ppt he says this
new Image().src = "http://webcelerity.com/blog/wp-content/themes/carrington-blog-faster/images/sprite.png
but it would be awesome if someone can show me what the doc head would actually look like
for ref; here is the ppt
thanks for your help in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
预加载图片的方法已经存在很久了,第一次见到是在用Dreamweaver MX做翻转效果的时候。
使用该方法,您可以并行下载图像并将其缓存在浏览器中(无需在此时实际显示它们)。
关于你的问题,文件的标题看起来像:
The method of preloading images has been around for ages, first time I had seen it was when I used Dreamweaver MX to do rollover effects.
Using that method you can parallelize download of the images and cache them in the browser (without the need of actually displaying them at that moment).
Regarding your question, the head of the document would look something like: