paper-header-panel内容div表现不正常

时间:2015-06-09 13:07:31

标签: css polymer polymer-1.0

我正在对聚合物1.0元素进行简单测试。在纸张标题面板测试中,内容区域元素不可见或正在纸质标题div上移动。演示版为here,代码如下。为什么没有显示内容文本?

alphabet = {'A':1, 'B': 2, 'C': 3, 'D':4, 'E': 5, 'F': 6, 'G':7, 'H':8, 'I':9, 'J':10,
            'K':11, 'L':12, 'M':13, 'N':14, 'O':15,'P': 16,'Q': 17,'R': 18,'S':19,'T':20,
            'U': 21, 'V':22, 'W':23, 'X': 24, 'Y':25, 'Z':26, ' ':27}

3 个答案:

答案 0 :(得分:3)

这可能是你的问题。

<link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout.html">

尝试将此更改为

<link rel="import" href="bower_components/iron-flex-layout/classes/iron-flex-layout.html">

前一个只包含布局mixins(实际上是推荐的),而后者包含你似乎正在使用的布局类(以及/deep/选择器)。

答案 1 :(得分:2)

添加<link rel="import" href="bower_components/paper-styles/paper-styles.html">并从正文中删除样式属性:

<body class="fullbleed layout vertical">
  <paper-header-panel mode="waterfall" class="flex">
    <div class="paper-header" style="height: 60px;">I am the header</div>
    <div class="content fit">I am the content</div>
  </paper-header-panel>
</body>

通常,纸质工具栏组件用于纸张标题面板,为您导入纸张样式。

答案 2 :(得分:0)

可能会将class="fit"添加到<paper-header-panel>