这是我的问题:
我有一个带有输入字段和下拉列表的纸质对话框。这是代码(玉):
paper-action-dialog#createMatch(ng-heading="'Create Match' | translate", transition="core-transition-bottom", style="width: 600px")
p
| {{"Choose your match options" | translate}}
p
paper-input#matchNameInput(floatinglabel="",ng-label="'Match Name' | translate", required="", ng-error="'You must enter a match name.' | translate",style="padding: 0")
p
paper-dropdown-menu#gameModeInput(ng-label="'Game mode' | translate")
paper-dropdown.dropdown
core-menu.menu
paper-item(ng-repeat="(id, name) in GameModeN" value="{{id}}") {{name}}
paper-button(affirmative="") {{"Cancel" | translate}}
paper-button.primary-btn(affirmative="", autofocus="") {{"Create" | translate}}
如果转换后的HTML过多,那么这就是转换后的HTML:
<paper-action-dialog id="createMatch" heading="Create Match" transition="core-transition-bottom" style="width: 600px">
<p>Choose your match options</p>
<p>
<paper-input id="matchNameInput" floatinglabel="" label="Match Name" required=""></paper-input>
</p>
<p>
<paper-dropdown-menu id="gameModeInput" label="Game Mode">
<paper-dropdown class="dropdown">
<core-menu class="menu">
<paper-item value="value">Item</paper-item>
</core-menu>
</paper-dropdown>
</paper-dropdown-menu>
</p>
<paper-button affirmative="">Cancel</paper-button>
<paper-button affirmative="" autofocus="" class="primary-btn">Create</paper-button>
</paper-action-dialog>
我尝试过使用position:absolute
以及菜单及其父母的几乎所有排名类型组合。似乎没什么用。也许这是因为它在阴影中?如何让菜单浮动其他所有内容?
答案 0 :(得分:3)
layered
属性应该执行此操作
<paper-dropdown class="dropdown" layered="true">
<core-menu class="menu">
<paper-item value="value">Item</paper-item>
</core-menu>
</paper-dropdown>