2014-06-27 27 views
1

你好我想在css中使用聚合物屬性。在括號內使用聚合物屬性

這是我的代碼:

background: url({{ image }}); 

,但它似乎沒有工作和輸出

url('%7B%7B%20image%20%7D%7D'); 
+0

可能對您有所幫助。 http://stackoverflow.com/questions/22987407/polymer-forcing-css-to-load-and-background-image-issues –

回答

1

我不認爲聚合物目前支持模板<style>標籤內綁定。您可以改爲在元素上使用內聯樣式屬性,也可以添加一個imageChanged處理程序並使用cssom編輯樣式表。

+1

它在本地Shadow DOM下工作。見https://github.com/Polymer/polymer/issues/270#issuecomment-24683309。但是shadow dom polyfill不支持'