Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个具有一定高度的列表,需要使其滚动以垂直显示其余部分。 所以我添加overflow-y: hidden;到列表中。 但是子菜单不可见,并且显示了水平滚动条。
overflow-y: hidden;
有什么解决办法吗? 代码在这里
只需增加 .wrapper 的宽度
.wrapper { margin: 20px; background: gray; color: white; width: 400px; height: 100px; /* I need overflow-y auto,but I also need to display the submenu*/ overflow-y: auto; overflow-x: visible; }