CSS sprite 对移动网站也有用吗?

发布于 2024-10-09 03:10:04 字数 76 浏览 0 评论 0原文

CSS sprite 对移动网站也有用吗?将所有可能的图像组合起来会不会很好。但所有内容都没有在同一页面上使用?移动浏览器的缓存空间有限。

Is CSS sprite also useful for mobile websites? Would it be good to combine all possible images to combine. but all are not being used on same page? Mobile browsers has limited cache space.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无人问我粥可暖 2024-10-16 03:10:04

非常重要,如果您的目标浏览器支持它。现代浏览器(Android、iPhone、WP7)当然可以。精灵图像通常不会很大,减少请求对于移动网络来说是一个巨大的胜利。

Very much so, if your target browsers support it. Contemporary browsers (Android, IPhone, WP7) certainly do. Sprite images are typically not huge, and reducing requests is a big win on mobile networks.

以歌曲疗慰 2024-10-16 03:10:04

要比 Craig Stuntz 的回答更进一步,只加载您需要的内容。将精灵分成几组(例如,在所有页面上加载的图像、在 X 页面上加载的图像、在 Y 页面上加载的图像等)。占用

空间越小越好。

To go one step further than Craig Stuntz answer, only load what you need. Separate your sprites out into groups (eg, Images that load on all pages, Images that load on page X, images that load on page Y, etc.)

The smaller the footprint the better.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文