body { transition:all 2s; } .wrap { width:283px; cursor:crosshair; overflow:hidden; position:relative; float:left; } .kuang { z-index:10; position:absolute; width:150px; height:150px; box-shadow:rgb(0,0,0) 0 0 5px; left:-999px; } .bigbg { float:left; width:300px; height:300px; border:1px solid rgba(0,0,0,0.5); display:none; position:relative; overflow:hidden; }
边框有限制移动的效果,还不太会封装