兼容移动手机的js拖拽插件Draggin.js -JS/jQuery代码 -演示与下载 -时代Java

兼容移动手机的js拖拽插件Draggin.js Mobile Compatible Drag And Drop Library – Draggin.js

Features (用鼠标拖动我!)

下面的文字和图标都是可以拖动的哦!

Reposition items without interrupting the flow of the page

Using the CSS3 transform property, the layout of the webpage will not be altered while you drag.


Ridiculously easy to use

Draggin.js has incredibly simple syntax: just give an element the draggable classname to render an instantly draggable element.


Editable text!

Draggin.js provides user-editable text elements that are also easily dragged around to help you craft the ultimate user interface. Double click on this paragraph to see for yourself, and click anywhere outside of the text to stop editing.


示例演示

Simple Draggable Element

<img class="draggable" src="img/cursor.svg" alt="Cursor Icon">
Cursor Icon

Simple Editable & Draggable Text

<h1 class="draggable text">Hello, World!</h1>

Hello, World!

Dragging a List with Undraggable Contents

<ul class="draggable">
    <li>Hello,</li>
    <li>World!</li>
</ul>

  • Hello,
  • World!
  • Drag
  • My
  • Border!

Editable & Undraggable Text

<h1 class="draggable text">Hello, World!</h1>

Hello, World!

下载代码说明
X关闭

跨平台兼容移动手机的js拖拽插件Draggin.js

Draggin.js是一个兼容移动手机的js拖拽插件。该js拖拽插件的特点是跨平台,体积小,运行速度快。该js拖拽插件会自动计算元素相对于文档左上角的位置,然后通过CSS transform属性将它重新定位。Draggin.js拖拽插件插件的特点还有:轻量级,压缩后的版本仅3k。完全兼容移动触摸设备。使用时不需要编写任何js代码。插件利用GPU提高性能。没有任何外部依赖文件。本代码适用浏览器:搜