<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>拖拽</title>
<style>
.draggable{
width: 300px;
height: 200px;
background: lightgrey;
position: absolute;
top: 0;
left: 0;
border-radius: 5px;
}
.draggable header{
background-color: blue;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
height: 30px;
line-height: 30px;
text-align: center;
cursor: move;
color: #fff
}
</style>
<script>
window.onload=function () {
let box=document.getElementsByClassName(
JS实现窗口拖拽
最新推荐文章于 2022-11-03 11:07:02 发布