【问题标题】:Sortablejs, drag-drop without other elements moveSortablejs,拖放没有其他元素移动
【发布时间】:2022-08-13 22:11:20
【问题描述】:

在元素下降之前元素怎么可能没有移动?

In this image, you can see how it is working

this is what I need

源代码:

var lgh = document.querySelectorAll(\'.list-group-header\'), i=0;
for(i;i<lgh.length;i++){
    new Sortable(lgh[i], {
        group: \'stored\',
        draggable: \'.board-header-item\',
        forceFallback: true,
        dragoverBubble: true,
        animation: 150  
    });
}
.sortable-ghost {background-color: white}
.sortable-fallback {transform: rotate(1deg);}
.sortable-fallback{cursor: pointer !important}
.list-group-header .sortable-ghost {background-color: white;color:black}
.list-group-header .sortable-fallback {transform: rotate(2deg);background: white}
.list-group-header .sortable-fallback {cursor: pointer !important}    
.board-header-item{display: inline-block;padding: 7px 10px;border: 1px solid black;text-align: center}
<script src=\"http://sortablejs.github.io/Sortable/Sortable.js\"></script>
<div class=\"list-group-header\">
    <div class=\"board-header-item status_size\">
        <span class=\"second\">Status</span>
    </div>
    <div class=\"board-header-item person_size\">
        <span class=\"second\">People</span>
    </div>
    <div class=\"board-header-item date_size\">
        <span class=\"second\">Date</span>
    </div>
    <div class=\"board-header-item timeline_size\">
        <span class=\"second\">Timeline</span>
    </div>    
</div>

    标签: javascript sortablejs


    【解决方案1】:

    我找到了解决方案

    交换:是的, 动画:0

    伙计们,像我一样

    如果你英语不好,这个论坛不适合你

    这里只有专业的英语人士,他们知道好问题,答案,分机。

    如果有人知道您的问题的答案,但您在句子中错过了分号,他们会告诉您:让我们去学习语法,然后来这里回答您的问题。

    再见堆栈溢出,感谢您过去帮助我。 我永远不会再发帖,没有帮助,没有问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-04
      相关资源
      最近更新 更多