gpt4 book ai didi

javascript - object.style.zoom 属性在 Firefox 中不起作用

转载 作者:行者123 更新时间:2023-11-30 09:03:29 26 4
gpt4 key购买 nike

我正在使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com