js+jquery实现图片裁剪功能

2020-05-22 16:21:09易采站长站整理

    top    : parseInt(block.css(“top”)),
    width  : block.width(),
    height : block.height()
   }
  }
 }
 $.fn.clip = function(options){
  options.container = this;
  return new clip(options);
 }
})();
 xx = $(“#container”).clip({
  imgC : $(“#imgC”)
 })
</script>
</body>
</html>

是不是很炫酷啊,小伙伴们,学学本示例的思路吧。