我是Angular的新手,正在使用Angular 8和ng-bootstrap构建页面。我在页面上有一个手风琴,其中包含3个不同的部分。每个部分都包含一个表格。表格中每行最左边的元素是一个下拉按钮,其中包含我想要选择的页面列表。
问题在于,我的下拉列表中的项目被隐藏在手风琴面板后面。我已经阅读了许多关于此问题的stackoverflow帖子(具体涉及bootstrap),但提供的解决方案似乎无法解决问题。我尝试过为下拉菜单设置z-index和设置overflow: visible的CSS属性,但两者都没有起作用。在花费了相当长的时间后,我决定发布一个问题。以下示例基本上直接来自ng-bootstrap.github.io。
以下是我最终得到的图片: 下拉菜单应该显示3个项目,但是它被截断了。
问题在于,我的下拉列表中的项目被隐藏在手风琴面板后面。我已经阅读了许多关于此问题的stackoverflow帖子(具体涉及bootstrap),但提供的解决方案似乎无法解决问题。我尝试过为下拉菜单设置z-index和设置overflow: visible的CSS属性,但两者都没有起作用。在花费了相当长的时间后,我决定发布一个问题。以下示例基本上直接来自ng-bootstrap.github.io。
<ngb-accordion #acc="ngbAccordion" activeIds="ngb-panel-0">
<ngb-panel title="ngbAccordion Panel #1">
<ng-template ngbPanelContent>
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia
aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor,
sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica,
craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings
occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus
labore sustainable VHS.
<div class="row">
<div class="col">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>Toggle dropdown</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>Thing 1</button>
<button ngbDropdownItem>Thing 2</button>
<button ngbDropdownItem>Thing 3</button>
</div>
</div>
</div>
</div>
<br>
</ng-template>
</ngb-panel>
<ngb-panel title="ngbAccordion Panel #2">
<ng-template ngbPanelContent>
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia
aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor,
sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica,
craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings
occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus
labore sustainable VHS.
</ng-template>
</ngb-panel>
</ngb-accordion>
以下是我最终得到的图片: 下拉菜单应该显示3个项目,但是它被截断了。