This article mainly introduces the usage of the jQuery Avatar cropping tool jcrop, and analyzes the jQuery Avatar cropping tool jquery in the form of examples. jcrop. the specific usage tips of js are provided with the complete demo source code for readers to download. If you need it, you can refer to the following example to describe the jcrop usage of the jQuery Avatar cropping tool. We will share this with you for your reference. The details are as follows:
Currently, most popular Avatar cropping tools are flash and jquery. I personally think it is better to use jquery, because the code is carefully studied and can basically understand what is going on. It is easier to change it.
For an example, see the jcrop demo, which is modified by the root jcrop example. Add the following two features:
1, center display, and can be dragged to change the size of the clip
2. The size of the previewed image is proportional to the size of the root drag.
Below is the js Code, which is simple Encapsulation
Jcrop image dragging