如果我移动一个小图像,多少 DOM 会被刷新?
新手问题:我正在制作一个简单的html游戏。它由以下 DIV 层组成:
z=1: large image (framing image)
z=2: medium image covering z1 (houses, trees)
z=3: small image covering z2 (character)
z=4: semi transparent image covering z3 (foreground objects)
z=5: medium image covering z2 but not z3 (other objects on the scene)
如果我移动角色(z3 层),DOM 的哪些部分会刷新? 我知道这取决于浏览器,但是是否有最小化更改的通用规则?
Newbie question: I am making a simple html game. It consists of these DIV layers:
z=1: large image (framing image)
z=2: medium image covering z1 (houses, trees)
z=3: small image covering z2 (character)
z=4: semi transparent image covering z3 (foreground objects)
z=5: medium image covering z2 but not z3 (other objects on the scene)
If I move the character (layer z3), which parts of the DOM are refreshed?
I know it depends on the browser, but are there general rules for minimizing the changes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Paul Irish 制作了一个简短的视频,介绍如何通过 Chrome 的开发工具从 Chrome 中获取这些信息。它位于 http://paulirish.com/2011/viewing-chromes-paint- 虽然所有浏览器在重绘过程中发生的情况都会有所不同,但这
应该提供一些立足点。
Paul Irish did a quick video on how to get this information out of Chrome via its DevTools. It is located at http://paulirish.com/2011/viewing-chromes-paint-cycle/
While all browsers will vary somewhat in what goes on during repainting, this should offer a bit of a foothold.