样式纸输入聚合物1.0

时间:2015-11-17 21:12:51

标签: html css polymer

如何设置纸质输入元素的样式,该元素放在我的index.html文件中,并附带我的style.css文件?

我尝试了聚合物文档中提到的例子:



paper-input.my-class {
        --paper-input-container-color: red;
        --paper-input-container-focus-color: blue;
        --paper-input-container-invalid-color: green;
        --paper-input-container-input-color: black;
    }

<paper-input class="my-class" label="test" ></paper-input>
&#13;
&#13;
&#13;

但没有变化!

我的代码有什么问题?

1 个答案:

答案 0 :(得分:0)

您的样式必须是<style is="custom-style">或自定义元素的样式,才能使用自定义css属性。

Here are the docs了解更多信息。