My general idea is: always monitor the coordinates of the mouse. When the mouse moves, the transparent layer moves with the mouse, and the large picture moves relative to the movement of the transparent layer. Without further ado, let’s look at the code.