Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在构建一个 HTML5 应用程序,可以访问来自精灵表的大约 1000 多个图像。
目前我正在从数据库访问图像,它有大约 200 毫秒的小时间延迟。我已经检查过了,这不是导致问题的 onlick 或 touch 事件。有没有比访问数据库更好的选择...比如说将图像保存在 Java 类中?
如果我在 XML 中执行此操作并通过 DOM 引用图像,则继续查找整个页面(甚至通过 ID)可能会非常复杂。
建设性的建议将不胜感激!
一种选择可能是使用 CSS 图像精灵。
http://www.w3schools.com/css/css_image_sprites.asp