"Element dragging to change size" is actually the same principle as "element dragging", except that the dynamically changed objects are different. It mainly lies in the use of top, left, width, and height, which is relatively easy to implement. The source code prototype is attached below. Once you understand the principle and expand other practical applications, the idea becomes much simpler and clearer
The following is the JavaScript Code