<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.from, .to {
width: 240px;
height: 240px;
background-color: yellowgreen;
}
.move {
width: 100px;
height: 100px;
background-color: red;
}
</style>
</head>
<body>
<h3>从这个盒子</h3>
<div class="from">
<div class="move" draggable="true"></div>
</div>
<h3>到这个盒子</h3>
<div class="to"></div>
</body>
</html>
<script>
var from =
css3实现拖拽
最新推荐文章于 2023-06-23 20:38:43 发布