div拖动
body,
html {
margin: 0;
padding: 0;
height: 100%;
}
#box {
width: 100vw;
height: 100vh;
overflow: hidden;
}
#left {
width: calc(30% - 5px);
height: 100%;
background: #8000FF;
float: left;
}
#resize {
width: 5px;
height: 100%;
cursor: w-resize;
float: left;
}
#right {
float: right;
width: 70%;
height: 100%;
background: #19FF00;
}
window.onload = function () {
var resize = document.getElementById("resize");
var left = document.getElementById("left");
var right = document.getElementById("right");
var box = document.getElementById("box");
resize.onm