引用jquery和drag.js
html
<div class="drag-container"> <img src="./1.jpg"alt=""width="600"class="drag-opa"> <img src="./1.jpg"alt=""width="600"class="drag-clip"> <div class="drag-move"><span></span><span></span><span></span><span></span></div> </div> <div class="clip-show"style="position:relative"></div>
js
$('.drag-container').drag({ // clipshow 显示移动框图片,默认.clip-show,可为空 'clipshow': '.clip-show' })