Css 如何在`overflow:hidden`div中启用滚动
我已经用Css 如何在`overflow:hidden`div中启用滚动,css,reactjs,scroll,drag-and-drop,react-beautiful-dnd,Css,Reactjs,Scroll,Drag And Drop,React Beautiful Dnd,我已经用dnd实现了看板。这是我想要的方式 我希望能够在具有溢出:隐藏的的div容器中使用此板。但是,这样做可以防止在视口之外的列中拖动卡片,屏幕不再水平向右滚动 我正在简化这个问题,之所以需要它是因为我使用的布局组件content组件是一个带有overflow:hidden的div 下面是一个演示这个问题 基本上,这是可行的,我可以将卡片拖到右边,它将水平滚动: <div style={{ overflow: 'unset}} > <Kanban /> <
dnd
实现了看板。这是我想要的方式
我希望能够在具有溢出:隐藏的的div
容器中使用此板。但是,这样做可以防止在视口之外的列中拖动卡片,屏幕不再水平向右滚动
我正在简化这个问题,之所以需要它是因为我使用的布局组件content
组件是一个带有overflow:hidden
的div
下面是一个演示这个问题
基本上,这是可行的,我可以将卡片拖到右边,它将水平滚动:
<div style={{ overflow: 'unset}} >
<Kanban />
<div>
也许有一种方法可以将第一个div重置为这样
<div style={{ overflow: 'hidden }} >
<div style={{ }}> // something here to reset container div?
<Kanban />
</div>
<div>
你找到解决方法了吗?我找到了,但不是用dnd
。真遗憾。我最终使用了@richardrout/react smooth dnd
,当从'@richardrout/react smooth dnd'
导入导入{Container}时,请这样使用:
它是react smooth dnd
的一个分支。您将拥有所有的文档:
<div style={{ overflow: 'hidden }} >
<div style={{ }}> // something here to reset container div?
<Kanban />
</div>
<div>