一、在head部分(和之間)插入相關(guān)css和js文件。 二、在head部分插入回調(diào)函數(shù)等相關(guān)處理參數(shù)。 復(fù)制代碼代碼如下: <!-- jQuery(function($){ // Create variables (in this scope) to hold the API and image size var jcrop_api, boundx, boundy; $('#cropbox').Jcrop({ minSize: [0,0], maxSi...
官方網(wǎng)址:http://deepliquid.com/content/Jcrop.html 上面有很多demo,有興趣的可以上去看看. 此文章中,封裝的JS如下: 復(fù)制代碼代碼如下: jQuery.UtrialAvatarCutter = function(config){ var h,w,x,y; var os,oh,ow; var api = null; var sel = this; ...