We propose a novel method of tunable compensation for dispersion and dispersion slope based on a uniform fiber Bragg gratings (FBGs). A specially designed mechanical rotator and a metal beam with a thickness gradient can induce a nonlinear strain gradient along the length of the gratings so as to control the dispersion of the gratings and their dispersion slope as well. By way of changing rotation angle, the dispersion value was controlled from -894.6ps/nm to -365.2ps/nm while the dispersion slope from 1049.2ps/nm<sup>2</sup> to 134.8 ps/nm<sup>2</sup>. The centre wavelength was measured to shift by less than 0.07nm. In simulated 80Gb/s NRZ transmission system, we showed to compensate dispersion and dispersion slope with system power penalty of about 2.5 dB by using the proposed method.