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>