简体   繁体   English

拖放时水平溢出内容,滚动条消失

[英]Overflowing content horizontally sans scrollbar with drag and drop

I need to rig up some <li> items so that they can be dragged and dropped horizontally. 我需要装配一些<li>项目,以便可以水平拖放它们。 Their container is a variable width though. 他们的容器是可变宽度的。 I need it so that if the <li> is dragged to the far right edge, the content within the container (other <li> s) will scroll to the left so that the active <li> can be dropped on the far right. 我需要它,以便将<li>拖动到最右边,容器中的内容(其他<li> )将滚动到左侧,以便可以将活动<li>放到最右边。

Can anyone help? 有人可以帮忙吗?

Fiddle at http://jsfiddle.net/j_holtslander/5WpT6/ http://jsfiddle.net/j_holtslander/5WpT6/上提琴

your problem is with the overflow being hidden. 您的问题是隐藏的溢出。 If you are hiding the overflow, you cannot see the last li if the browser's width is lower then the container 's width, because they are hidden. 如果要隐藏溢出,则如果浏览器的宽度小于容器的宽度,则看不到最后一个li ,因为它们是隐藏的。

If you what that functionality to work as planned you should, for usability reasons, let the li elements flow over the browser's width change, not hiding them. 如果出于可用性方面的考虑,如果要按计划工作该功能,则应让li元素在浏览器的宽度变化范围内流动,而不要隐藏它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM