# 极简JS拖拽 **Repository Path**: leichenqing/zxx-drag ## Basic Information - **Project Name**: 极简JS拖拽 - **Description**: 兼容 IE 和移动端的极简拖拽效果实现,全局暴露,即插即用 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2022-05-17 - **Last Updated**: 2022-05-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 极简 JS 拖拽 ### 介绍 兼容 IE9+ 和移动端的极简拖拽效果实现,全局暴露,即插即用,支持边界限制判断。 ### 演示 演示地址:https://zhangxinxu.gitee.io/zxx-drag/demo.html ### 语法 ```js zxxDrag (eleBar, options); ``` ### 参数说明
{ left: 0, top: 0, bottom: 0, right: 0 }其中,无论是 left, right 还是 top, bottom 值均是相对于浏览器窗口左边缘和上边缘计算的。 如果参数是 DOM 元素,则被限制的拖拽范围就是这个元素。 默认值是 window,表示限制范围是整个浏览器窗口。