Html
    Css
    Js

    
                        
#slider,#slider2 {
	width:100px;
	height:100px;
	cursor:pointer;
	position:absolute;
}
#slider {
	background:#FF7800;
}
#slider img {
	width:100%;
	height:100%;
}
#slider2 {
	background:#0000FF;
}
#box {
	width:960px;
	height:540px;
	border:1px solid #000000;
	position:relative;
	top:10px;
	left:10px;
}
#div1 {
	width:300px;
	height:40px;
	background:#FFA500;
	margin:30px auto;
	position:relative;
}
#div2 {
	width:40px;
	height:40px;
	background:#008000;
	position:absolute;
	left:0;
	top:0;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

js实现div内拖拽缩放

0