我们正在努力试图打破隐藏溢出的div.
我们有一个下拉菜单,在用户输入时填写建议(在搜索字段中输入’c’来查看).这个下拉菜单目前隐藏在菜单栏后面,因为它有“溢出隐藏”.
我们可以突破,如果我们删除顶部:100%并将位置设置为固定.但我们希望它保持绝对(即移动设备).
这里创建了一个示例:https://edukarma.com/bootstrap/
下拉建议列表可以在.headerItem.headerSearch .searchField .twitter-typeahead .tt-dropdown-menu中找到.
解决方法
可能的解决方法是使用以下内容替换overflow:hidden:
.navbar .headerItem.headerSearch { display: table; /* like overflow,creates new block formatting context */ margin-left: 180px; padding-right: 15px; margin-top: 11px; } .navbar .headerItem.headerSearch:after { /* hack to make the table use all available width */ content: '. .'; /* with such big spacing,the 2nd dot will always wrap to the new line,making the table-like block use the width of the container instead of shrinking to content */ word-spacing: 99in; /* make this helper invisible */ display: block; height: 0; overflow: hidden; }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。