溢出到固定 div 内的下一行?
我有一个固定的div,里面有一个ul。固定div设置为overflow-x:hidden;
和overflow-y:scroll;
,每个li设置为float:left;
。当一行中的 li 太多而无法查看时,我希望它们溢出到下一行,但它会继续沿直线延伸到无穷大,而不会中断到下一行。 lis 由 JavaScript 脚本生成。
以下是该页面的链接: http://hypotheticalmeraki.doubleohnine.com
编辑:在左下角,有一个向上的箭头,当你点击它时,固定的 div 就会出现。其中的图像各为一里。
非常感谢
问题已解决 将 ul 设置为固定宽度(使其非常重要)并设置overflow-x:hidden;和overflow-y:scroll;。
I have a fixed div with a ul inside of it. The fixed div is set to overflow-x: hidden;
and overflow-y: scroll;
, each li is set to float: left;
. When there are too many li to view in a line, I want them to overflow to the next line, but it continues in a straight line to infinity, never breaking into the next line. The lis are generated by a JavaScript script.
Here is the link to the page: http://hypotheticalmeraki.doubleohnine.com
Edit: on the bottom left, there's an up arrow, when you click that, the fixed div comes up. The images in that are each an li.
Thank you so much
Issue Fixed
Made the ul a fixed width (made it !important) and set overflow-x: hidden;
and overflow-y: scroll;
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个
try this
使用
overflow: auto;
而不是使用overflow-x:hidden
和overflow-y:scroll
Use
overflow: auto;
instead of usingoverflow-x: hidden
andoverflow-y: scroll