0
我使用聚合物2.0樣式模塊(https://www.polymer-project.org/2.0/docs/devguide/style-shadow-dom#style-modules)。聚合物2.0樣式模塊共享樣式在網頁上打印CSS源
樣式正在工作。然而,在Chrome瀏覽器中,css內容會打印到網頁上,看起來像是亂碼。在Firefox中完美工作。我如何在Chrome中解決這個問題?提前致謝。
以下是我有:
LBW-CSS-styles.html
<dom-module id="lbw-css-styles">
<template>
<style>
:root {
background-color:green;
...
</style>
</template>
</dom-module>
頁的test.html
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/polymer/polymer-element.html">
<link rel="import" href="lbw-css-styles.html">
<dom-module id="page-test">
<template>
<style include="lbw-css-styles">
...
</style>
</template>
<script>
Polymer({
is: 'page-test',
</script>
</dom-module>