如何使用聚合物1.0纸张样式颜色?

1 css material polymer

如何将纸质工具栏的背景颜色设置为--paper-teal-500?

  <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
  <link rel="import" href="bower_components/paper-styles/paper-styles.html">

  <style is="custom-style">
    paper-toolbar {
        background-color: paper-teal-500;
    }
  </style>
</head>

<body style="margin: 0;">
  <link rel="import" href="bower_components/paper-toolbar/paper-toolbar.html">

  <paper-toolbar>
    <div title>Tabara</div>
  </paper-toolbar>
Run Code Online (Sandbox Code Playgroud)

小智 8

好吧,我设法搞清楚了.

background-color: var(--paper-teal-500);
Run Code Online (Sandbox Code Playgroud)

会做.希望它能帮助任何有需要的人!