Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css AngularJS风格问题_Css_Angularjs_Internet Explorer_Angularjs Scope_Ng Style - Fatal编程技术网

Css AngularJS风格问题

Css AngularJS风格问题,css,angularjs,internet-explorer,angularjs-scope,ng-style,Css,Angularjs,Internet Explorer,Angularjs Scope,Ng Style,我在想如何在IE上实现这一点: 代码基本上生成了一个动态表,对象的左侧位置取自用户_得分值 我知道IE没有正确阅读此声明,我过去也有类似的错误: 因为{xxx.xxx}}是无效的css,它是由IE构造的,当角度编译器扫描所有属性时,style属性为空 我知道肯定有类似的解决方案,但到目前为止我还没能找到 Thx提前 另外,需要注意的是,IE上的结果是一个空样式attr 问题是相同的,可以使用ng样式或ng attr样式解决: ng风格: <div ng-style="{left: ((

我在想如何在IE上实现这一点:

代码基本上生成了一个动态表,对象的左侧位置取自用户_得分值

我知道IE没有正确阅读此声明,我过去也有类似的错误:

因为{xxx.xxx}}是无效的css,它是由IE构造的,当角度编译器扫描所有属性时,style属性为空

我知道肯定有类似的解决方案,但到目前为止我还没能找到

Thx提前


另外,需要注意的是,IE上的结果是一个空样式attr

问题是相同的,可以使用ng样式或ng attr样式解决:

ng风格:

<div ng-style="{left: ((result.user_score * 20) - 10) + '%'}" class="test-box" ng-if="result.is_mesurable==true">

ng attr-*

<div ng-attr-style="left:{{ (result.user_score * 20)-10}}%" class="test-box" ng-if="result.is_mesurable==true" >

太好了,再次谢谢。我仍然觉得很难解决像这样的问题。