2017-03-18 1 views
0

iron-flex-layout wird nicht angewendet. kann jemand darauf hinweisen, was ich falsch mache?Eisen-Flex-Layout wird nicht auf Hauptdokument angewendet

<!DOCTYPE html> 
<html> 
    <head> 
    <meta charset="UTF-8"> 
    <title></title> 
    <script src="components/webcomponentsjs/webcomponents-lite.js"></script> 
    <link rel="import" href="components/polymer/polymer.html"> 

    <link rel="import" href="components/iron-flex-layout/iron-flex-layout.html"> 
    <link rel="import" href="components/paper-button/paper-button.html"> 
    <style is="custom-style"> 
     body { margin: 0; height: 100vh; @apply(--layout-horizontal); @apply(--layout-center);} 
     body div#utilitiesContainer { @apply(--layout-horizontal);width:60%; height:auto; height:400px; padding:10px; border-radius:5px; background-color:#000000;@apply(--layout-self-center);} 
     body paper-button {@apply(--layout-flex);} 
    </style> 
    </head> 
    <body unresolved> 
    <paper-button raised>Raised button</paper-button> 
    <div id="utilitiesContainer"> 
    </div> 
    </body> 

i bin mit dem 2.0 Vorschau

Antwort

1

In Polymer2.0 is ist nicht verfügbar, da die meisten der Browser nicht auf sie einverstanden war. Also, um custom-style zu verwenden Sie style Tag innerhalb custom-style Tag

<custom-style> 
    <style> 
    </style> 
</custom-style> 

auch wickeln werden müssen, haben Sie verpasst include Attribut in Ihrem Stil-Tag.

Hier sind einige Referenzen für Sie

Verwandte Themen