我正在使用 object.style.zoom
在 div 标签内进行缩放,它在 IE 中工作。我需要它用于 Firefox。请指导我。我可以得到任何 style.zoom
的替代品吗?
最佳答案
zoom
未在 Firefox 中实现。
“替换”是 transform
来自 CSS3:https://developer.mozilla.org/En/transform
Firefox 的 JavaScript 示例:
document.getElementById('x').style.MozTransform = "scale(2)";
document.getElementById('x').style.MozTransformOrigin = "0 0";
值得指出的是 CSS3 转换是 supported in all modern browsers .您应该只使用 zoom
作为 IE8 及更低版本的后备。
关于javascript - object.style.zoom 属性在 Firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7175766/