gpt4 book ai didi

html - 无法在表格中显示组合框

转载 作者:太空宇宙 更新时间:2023-11-04 10:06:47 24 4
gpt4 key购买 nike

今天,我随时都可以创建 Combobox-like。而且我不知道我无法显示所有可供选择的元素。

你可以看起来像:

似乎 ComboBox 中的所有元素都隐藏在 table 后面。

HTML代码:

<div class="btn-group open">
<button type="button" class="multiselect dropdown-toggle btn btn-white btn-primary"
data-toggle="dropdown" title="None selected" aria-expanded="true">None selected
<b class="fa fa-caret-down"></b>
</button>
<ul class="multiselect-container dropdown-menu">
<li><label class="checkbox">Checkbox</label></li>
<li><label class="checkbox">
<input type="checkbox" class="ace" value="0"><span class="lbl"></span> STT</label></a>
</li>
</ul>
</div>

CSS 代码:

.btn-group {
position: relative;
display: inline-block;
vertical-align: middle;
}

.multiselect-container {
position: absolute;
list-style-type: none;
margin: 0;
padding: 0;
}

.multiselect-container>li {
padding: 0;
}

li {
display: list-item;
}

.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
padding: 5px 0;
margin: 2px 0 0;
}

如何在我的案例中显示 ComboBox 的所有元素?谢谢。

最佳答案

检查相关元素的 z-index 属性。您希望出现在前面的元素应该比您希望出现在后面的元素具有更大的 z-index 属性。

关于html - 无法在表格中显示组合框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37936846/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com