【问题标题】:Style paper-input Polymer 1.0样式纸张输入 Polymer 1.0
【发布时间】:2015-11-18 06:41:46
【问题描述】:

如何设置纸张输入元素的样式,该元素与 style.css 文件一起放置在我的 index.html 文件中?

我尝试了聚合物文档中提到的示例,例如:

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>

但没有任何变化!

我的代码有什么问题?

【问题讨论】:

    标签: html css polymer


    【解决方案1】:

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

    Here are the docs 了解更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-28
      相关资源
      最近更新 更多