在样式属性角的Bug IE10变量变量、样式、属性、Bug

2023-09-13 03:16:00 作者:卫生巾我只用立白的。

如果我做这样的事情:

<div style="margin-left: 50px;">TEST1</div>
<div style="margin-left: {{50}}px;">TEST2</div>

http://jsfiddle.net/XeVHL/1/

的利润率左值test2的将不适用,而这只能在IE中,对于一个工作解决这个什么建议吗?

The margin-left of the value test2 will not be applied, and this only in IE, any suggestion for a work around this?

推荐答案

你可以使用一种变通方法 NG-风格

As a workaround you could use ng-style:

<div ng-style="{ 'margin-left': 50 + 'px'}">TEST2 {{50}}</div>

小提琴: http://jsfiddle.net/YXe8Z/