html代码:
<div id="box" draggable="true"></div>
css样式:
*{
margin: 0;
padding: 0;
}
div{
width: 800px;
height: 700px;
background-color: whitesmoke;
margin: 10px auto;
background-repeat: no-repeat;
background-size: 600px 600px;
position: relative;
box-shadow: 0 0 3px 0 gray;
/* box-sizing: content-box; */
}
p{
box-sizing: border-box;
position: absolute;
background-repeat: no-repeat;
background-size: 800px 700px;
/* box-sizing: border-box; */
}
js代码:
var pinTu = {
pArr:[],
box:document.getElementById('box'),
pS