Recently, I made a small image management system for a customer. The image directly uses the address without going through the server. However, he asked the image not to be distorted or distorted. In this way, we need to use JS on the client. Fortunately, with jQuery, it is more convenient to do this. I wrote a small plug-in www.2cto.com... SyntaxHighlighter. all ();
Recently, I made a small image management system for a customer. The image directly uses the address without going through the server. However, he asked the image not to be distorted or distorted. In this way, we need to use JS on the client. Fortunately, with jQuery, it is more convenient to do this. I wrote a small plug-in www.2cto.com autosize.
Suppose there is such an image
The image size is forcibly set to 200*300. If the image size of the address is not, the image will be deformed. So I want to find a way to maximize the image proportion by 200*300. So we have the following plug-ins.
It is easy to use. Before use, you must introduce the jquery library and my image. js in the header.