纸张输入与纸张下拉菜单不对齐

时间:2015-09-01 21:12:51

标签: polymer polymer-1.0

我有以下标记:

<template>
    <div class="layout horizontal">
        <paper-input label="Endpoint URL" id="url" value={{url}} class="flex">
            <iron-icon icon="language" prefix></iron-icon>
        </paper-input>
        <paper-dropdown-menu label="Method" alwaysFloatLabel="true" no-animations="true">
            <paper-menu class="dropdown-content">
                <paper-item>GET</paper-item>
                <paper-item>POST</paper-item>
            </paper-menu>
        </paper-dropdown-menu>
    </div>
</template>

然而,下拉菜单与输入框没有对齐。无论出于何种原因,下拉列表都会被推下一点。

有关如何获取输入框和下拉列表的任何建议?

谢谢。

1 个答案:

答案 0 :(得分:0)

The solution to this issues was to use the classes: "layout horizontal center-center".

By adding "center-center" I was able to get the desired result of having the input box of both paper-input and paper-dropdown-menu to line up.

I hope it helps.