Two in-vacuum undulators (IVU25) have been used since March 2009 at the Shanghai Synchrotron Radiation Facility. Another small-gap in-vacuum undulator with a smaller period length of 20 mm was completed in July 2010. The mechanical system of IVU25 consists of support frame, driving and guiding system, taper mechanism, compensation spring system, suspending rods assembly, etc. We have attempted to manufacture IVU25 with high mechanical stability, rigidity and reproducible gap motion. A mechanical design study of IVU25 is carried out which includes finite-element calculations on the mechanical deformation of the girder. Some modifications have been made to the design of IVU20.