包含内容标记时的聚合物元素高度

时间:2015-10-01 08:23:44

标签: polymer

我有一个问题,当我尝试将内容加载到我的元素中时,它始终具有height = 0,我需要按内容大小调整元素,是否有任何建议? 有我的模板

<template>
    <paper-dialog id="dialog" modal>
        <h2>{{_computeTitle()}}</h2>
        <paper-dialog-scrollable id="main">
            <content id="form" select=".content"></content>
        </paper-dialog-scrollable>
        <div class="buttons">
            <content select=".buttons"></content>
        </div>
    </paper-dialog>
</template>

1 个答案:

答案 0 :(得分:0)

为什么在对话框中使用可滚动对话框?您应该使用对话框并为子项提供位置:relative property。

相关问题