iPad:Safari 和 HTML5。加载图形非常慢
我是意大利人,所以请原谅我的英语不好。问题是这样的......
我正在尝试通过 HTML5 开发一个可用于 iPad1 的网站。 我必须使用平面测量法。 我从 Xml 文件中获取了 X 和 Y 坐标来制作此平面图,并通过 SVG“路径”标签绘制了它。 问题是,当我在 iPad 上用手指交互时,平面测量图像加载很重。每种图像,例如工具提示,我都会将其添加到平面测量中,并通过手指对其进行缩放、旋转或平移修改……跳跃。 我试图通过在我的 CSS 文件中添加此代码来解决激活硬件加速的问题,
#path { -webkit-transform: translateZ(0); }
但什么也没有!!没有变化。 (我在讨论 Safari 的论坛中读过这个解决方案)
也许问题是我有数千个路径标签(如线条和折线)要绘制。
我希望有人能尽快帮助我
提前致谢
i'm italian, so, excuse me for my bad english. The problem is this....
I'm trying to develop a web-site available for IPad1 by HTML5.
I have to work with a planimetry.
I have taken X and Y coordinates from a Xml file to make this planimetry, and I have drawn it by SVG 'path' tag.
The problem is that, when I interact by fingers, on the IPad, the planimetry image loading is heavy. Every kind of image, like tooltip, which I add on the planimetry and modify it in scale, rotation or traslation by fingers... jumps.
I tried to solve it activating Hardware Acceleration by adding this code in my CSS file
#path { -webkit-transform: translateZ(0); }
but nothing!! No change.
( i have read this solution in forums in which talks about Safari )
Maybe the problem is that i have thousands of path tags (like lines and polylines) to draw.
I hope someone could help me soon
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题很简单,处理器无法在短时间内绘制那么多零件。
也许绘制到 HTML5 中的
标签上,然后您可以将图像缓存为位图,这样当页面移动时就不需要重新绘制?
The problem is simply that the processor can't handle drawing that many parts in a short space of time.
Perhaps draw onto the
<canvas>
tag in HTML5, then you could cache the image as a bitmap so it wouldn't need to be redrawn when the page is moved?