Reaction wheels are commonly employed for high precisision and agile pointing in spacecraft. In this paper, we consider the realization of three-axis stabilization with only two reaction wheels installed along two principle axes. In practise, the total angular momentum of the whole spacecraft periodically varies with time because of the existence of in-orbit disturbances. With regard to the time varying system, firstly, a time varying control law is presented for velocity dumping based on center manifold theory. Then a continuous nonlinear feedback controller with a periodic time varying term is also presented for the attitude. Numerical simulations are presented to illustrate the effectiveness of the designs.