聚合物在IE或边缘不起作用,但在Chrome中它不起作用,但是对于Doctype,它也不能在chrome中起作用

Pet*_*ton 11 html doctype polymer polymer-1.0

我的聚合物项目遇到了一些麻烦,我的代码在IE,Edge中不起作用,如果我包含的话,甚至不在chrome中<!doctype html>.这是我的代码:

<!doctype html>
<html>
  <head>
    <link rel="import" href="bower_components/paper-header-panel/paper-header-panel.html">
    <link rel="import" href="bower_components/paper-card/paper-card.html">
    <LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
    <link rel="import" href="bower_components/polymer/polymer.html">
  </head>
  <body>
    <paper-header-panel mode="standard" id>
      <paper-toolbar  style="background-color: some-color">
        <h1>Blah</h1>
      </paper-toolbar>
      <div id="content">
      <div class="center2">
        <h3>Blah Blah Blah<span id="orange">Blah Blah Blah</span></h3>
      </div>
      <paper-card heading="Blah Blah Blah" id="main">
        <div class="card-content">
        </div>
      </paper-card>
      <paper-card heading="Blah Blah Blah" id="main">
        <div class="card-content">
          <img src="img.png" height="200px" id="img"/>
          </br>
          Blah Blah Blah
        </div>
      </paper-card>
      </div>
    </paper-header-panel>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

任何帮助都将受到重视.谢谢!

akc*_*c42 7

您需要polyfill在非Chrome浏览器中工作.我不认为你做过chrome,但也许你还会做到下一个版本.

<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
Run Code Online (Sandbox Code Playgroud)

在开始导入任何其他东西之前的标题中