In order to keep the sparse array mainlobe width of beam constant, a Frequency and Steering Invariant Beamforming(FSIB) method based on Compressed Sensing (CS) is proposed. Use CS recovery algorithm to recover the measurement signals and calculate its virtual weighted vector, the criterion of limiting the mean square error of the mainlobe and minimum the sidelobe level is adopted to optimize the design of FSIB. The proposed method not only ensures the constant beamwidth performance but also reduces the number of real array elements.