Polymer 页面中的iron flex布局中心
我正试图将纸卡垂直和水平居中,但无法找出哪里出了问题:Polymer 页面中的iron flex布局中心,polymer,flexbox,Polymer,Flexbox,我正试图将纸卡垂直和水平居中,但无法找出哪里出了问题: <body unresolved> <div class="flex-vertical"> <div class="flex-horizontal"> <paper-card heading="Login" image="http://placehold.it/400x175/FFC107/000000"> <
<body unresolved>
<div class="flex-vertical">
<div class="flex-horizontal">
<paper-card heading="Login" image="http://placehold.it/400x175/FFC107/000000">
<div class="card-content">
<paper-input label="Windows username" always-float-label></paper-input>
<paper-input label="Password" type="password" always-float-label></paper-input>
</div>
<div class="card-actions">
<paper-button>Login</paper-button>
</div>
</paper-card>
</div>
</div>
</body>
<style is="custom-style">
body {
@apply(--layout-fullbleed);
@apply(--layout-vertical);
}
.flex-horizontal {
@apply(--layout-horizontal);
@apply(--layout-center-justified);
}
.flex-vertical {
@apply(--layout-vertical);
@apply(--layout-center);
}
</style>
登录
身体{
@应用(--布局全放气);
@应用(--垂直布局);
}
.水平弯曲{
@应用(--水平布局);
@应用(--布局中心对齐);
}
.垂直弯曲{
@应用(--垂直布局);
@应用(--布局中心);
}
首先,我们需要导入iron flex布局类
元素。然后,我们定义所需的类,并从ironflex布局类
元素中包含所需的模块
<style is="custom-style" include="iron-flex iron-positioning iron-flex-alignment">
.card-container {
height: 100%;
}
</style>
首先,我们需要导入
ironflex布局类
元素。然后,我们定义所需的类,并从ironflex布局类
元素中包含所需的模块
<style is="custom-style" include="iron-flex iron-positioning iron-flex-alignment">
.card-container {
height: 100%;
}
</style>
可能的指导:可能的指导:谢谢我用mixins实现了这一点谢谢我用mixins实现了这一点