【发布时间】:2019-09-24 12:16:32
【问题描述】:
猜想我们有一个 128x512px 库存的 div 网格。我希望所有(项目 64x64px)div 都可以通过拖动 tehm 捕捉到网格。在库存中,div 必须是可排序的。我不想要清单。通过使用 jquery 或 js 以最简单的方式进行任何建议。
combine ui dragable and sortable
<style> #snaptarget {
height: 128px; width:512;
display: grid;
grid-gap: 64px 64px; background:green;
}
.item { border:thin solid black; display: inline-block;width: 64px;height:64px; background:yellow; display:inline-block;float:right; }</style>
<div id=snaptarget></div>
<div class="item sortable"><img></div>
【问题讨论】:
-
请澄清您所说的“我不想要列表”是什么意思。您在这里尝试了什么?您对此有何疑问?
-
不使用
- 标签
标签: jquery html jquery-ui-sortable drag