我正在尝试在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/)
但似乎效果不佳
答案 0 :(得分:0)
尝试制作占位符inline-block
.testclass {
background-color: red;
border: 2px solid red;
width: inherited;
display: inline-block;
}
演示:Fiddle