javascript中的跨浏览器缩放机制
我有一个由简单的
组成的图表,我需要允许用户放大和缩小。似乎修复了 IE 中许多问题的 css 缩放规则在其他浏览器中效果不佳或有时根本不起作用。是否有某种机制或库可以轻松地允许访问者放大和缩小包含许多
的
?我尝试了 firefox 的 -moz-scale ,当你缩放时,会发生各种奇怪的事情,z-indexs 脱离了什么,东西没有很好地对齐,等等。我很高兴让缩放成为你所在的功能需要使用现代浏览器,但至少需要支持最新版本的firefox、chrome和IE。如果有html5功能就好了。
I have a graph made out of simple <div>
s and I need to allow users to zoom in and out. It seems that the css zoom rule that fixes so many things in IE doesn't work well or sometimes at all in other browsers. Is there some kind of mechanism or library that I can easily allow visitors to zoom in and out of a <div>
that contains many <div>
s? I tried -moz-scale for firefox and all kinds of strange things happen as you zoom, z-indexes get out of what, things don't align so well, etc.
I'm happy to make zooming a feature where you're required to use a modern browser, but at least the latest versions of firefox, chrome and IE need to be supported. If there's an html5 feature, that's fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于缩放,我使用了 CSS3 变换(例如,scale(1.2))。它运行良好,并且支持 IE9、Mozilla 和 Webkit。
For Zooming I have used CSS3 Transforms (scale(1.2) for example). It works pretty well and is supported on IE9, Mozilla and Webkit.