代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>zxxDrag 拖拽演示页面</title>
<style>
.box{position:absolute; left:10px; top:50px; padding:5px; background:#f0f3f9; font-size:14px; box-shadow:2px 2px 4px #666666;}
.main{border:1px solid #a0b3d6; background:white;}
.bar{line-height:2; background:#beceeb; border-bottom:1px solid #a0b3d6; padding: 0 10px; cursor:move;}
.content{width:420px; height:250px; padding:10px; max-width: calc(100vw - 60px); background-color: #fff;}
.heading{margin-top:90vh;}
.container{outline:1px solid; max-width: 414px; height: 300px; background-color: #f5f5f5; position: relative;}
.target{width: 100px; height: 100px; background-color: #a0b3d6; opacity: .9; position: absolute;}
.target:active{opacity: 1;}
</style>
</head>
<body>
<div id="box" class="box">
<div class="main">
<div id="bar" class="bar">拖拽</div>
<div class="content">
内容……
</div>
</div>
</div>
<h3 class="heading">内部拖拽</h3>
<div id="container" class="container">
<div id="target" class="target"></div>
</div>
<script src="./zxxDrag.js"></script>
<script>
zxxDrag(bar, {
target: box
});
zxxDrag(target, {
bounding: container
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。