Size and velocity-dispersion evolution of early-type galaxies in a Λ cold dark matter universe