这是IE9的bug吗?
我有以下代码:
HTML 正文代码:
<div>asbcakjscb<div>
CSS 代码:
div {
width:400px;
height:400px;
background:red;
-ms-transform:scale(.3);
}
JavaScript 代码:
document.quertSelector('div').style.msTransform = 'scale(1)';
JavaScript 代码在页面的加载事件上运行。您可以在以下位置运行上面的代码: http://jsfiddle.net/fakjX
我需要更改 CSS3 变换比例样式IE9 上为 0.3 到 1。但我不能。我认为这是IE9的错误。代码看起来没有问题。
你同意这是 IE9 的 bug 吗?或者你有什么解决方案来解决这个问题吗?
谢谢。
I've codes below:
HTML body codes:
<div>asbcakjscb<div>
CSS codes:
div {
width:400px;
height:400px;
background:red;
-ms-transform:scale(.3);
}
JavaScript codes:
document.quertSelector('div').style.msTransform = 'scale(1)';
The JavaScript codes are run on the page's load event. You can run code above at: http://jsfiddle.net/fakjX
I need to change CSS3 transform scale style from 0.3 to 1 on IE9. But I can't. I think this is a IE9's bug. The codes appears no problem.
Do you agree this is a IE9's bug? Or do you have any solutions to fix this problem?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是 IE 中的错误,破折号符号在脚本中使用时无效。使用 jQuery 设置属性时,可以使用等效的驼峰命名法和对象表示法。
编辑:发现关于此主题的另一个问题 - IE9:为什么设置“-ms-transform”可以在 css 中工作,但不能在 jquery.css() 中工作
It's not a bug in IE, the dash notation is invalid when used in a script. You can use the camelCase equivalent and object notation when setting the property using jQuery.
Edit: Found another SO question on this subject - IE9: Why setting "-ms-transform" works from css, but not with jquery.css()