【发布时间】:2020-08-11 08:59:31
【问题描述】:
我的代码如下所示:
new Sortable(sortablelist, {
animation: 150,
ghostClass: 'sortable-ghost'
});
.box {
background-color: powderblue;
margin: 4px;
padding: 2px;
width: 25%;
cursor: move;
}
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script src="https://raw.githack.com/SortableJS/Sortable/master/Sortable.js"></script>
</head>
<body>
<center>
<div id="sortablelist">
<div class="box" id="Item 1">Item 1</div>
<div class="box" id="Item 2">Item 2</div>
<div class="box" id="Item 3">Item 3</div>
</div>
</center>
</body>
</html>
我是初学者,希望你能帮助我。我觉得我已经搜索了洞网。 订单将继续保存在数据库中,但我现在对 PHP 有点经验,并且认为我可以管理这个。
【问题讨论】:
标签: javascript drag-and-drop sortablejs