我正在尝试使 jQuery 上的占位符可排序。我得到了这个代码
$('#list').sortable({
placeholder: "testclass",
forcePlaceholderSize: true
});
<div id="list">
<div class="item">First</div>
<div class="item">Second</div>
<div class="item">Third</div>
</div>
.item {
border: 1px solid black;
padding: 2px 4px;
display: inline-block;
}
.testclass {
background-color: red;
border: 2px solid red;
}
( http://jsfiddle.net/EUVrK/81/ )
但似乎效果不佳