我想申請一個DIV,採用了棱角分明2型指令直列CSS3變換,變換屬性:角2,2.0.0-rc.2,不能適用風格指令
<div
[style.width.px]="front.width"
[style.height.px]="front.height"
[style.background-color]="front.backgroundColor"
[style.transform]="front.transform"></div>
組件數據是:
front['width'] = this.width + this.gapw;
front['height'] = this.height + this.gaph;
front['background-color'] = settings.backfacesColor;
front['transform'] = 'rotate3d(0, 1, 0, 0deg) translate3d(0, 0, ' + hw + 'px)';
我在控制檯中這樣的警告:
WARNING: sanitizing unsafe style value rotate3d(0, 1, 0, 0deg) translate3d(0, 0, 207px)
browser_adapter.js:83 WARNING: sanitizing unsafe style value rotate3d(0, 1, 0, 0deg) translate3d(0, 0, 207px)
browser_adapter.js:83 WARNING: sanitizing unsafe style value rotate3d(0, 1, 0, 180deg) translate3d(0, 0, 207px) rotateZ(180deg)
標準樣式,比如寬度和背景顏色重新應用。 Trasnform沒有得到應用。任何想法?
可能重複[在RC.1中,某些樣式不能使用綁定語法添加](http://stackoverflow.com/questions/37076 867/in-rc-1-some-styles-can-be-added-using-binding-syntax) –
@DanielPliscki也許內容是一樣的,但是這個問題是可怕的。我在發帖之前搜索過,沒有發現任何有關此問題的信息。 – albanx
我已經用我的解決方案更新了答案。 –