Relativistic mean-field description of the dynamics of giant resonances