我正在尝试在中实现下拉菜单。当我执行菜单之后,当我看到它隐藏在td后面时,如何查看下拉菜单而不隐藏在td后面谢谢。
这是我的代码。
<th className="t">
<span
id="dropdownMenuLink"
role="button"
data-toggle="dropdown"
aria-haspopup="false"
aria-expanded="true"
// dropdown-toggle
>
Score <br></br> Overall
</span>
<div
class="dropdown-menu nott "
aria-labelledby="dropdownMenuLink"
>
<a class="dropdown-item" href="# ">
Action
</a>
<a class="dropdown-item" href="/dashboard ">
dashboard
</a>
<a class="dropdown-item" href="# ">
Something else here
</a>
</div>
</th>
您可以尝试通过css / scss调整组件中下拉菜单的z-index
。试试这个到你的dropdown-menu
div
:
style={{ position: 'relative', zIndex: '1' }}
我将调整zIndex
值以找到可行的方法。