We examined the physical origin of the colour-magnitude relation of elliptical galaxies in clusters of galaxies in the hierarchical clustering scenario by using a semi-analytic model of galaxy formation. We particularly investigate the effects of the star formation process, the supernova feedback and the UV background on the formation and evolution of elliptical galaxies. It is suggested by observation that the colour-magnitude relation reflects the metallicity-luminosity relation of galaxies, and that for reproducing the colour-magnitude relation it is important to suppress the chemical enrichment of stars in faint galaxies. For suppressing the chemical enrichment, we propose some solutions. One is assuming a strong supernova feedback. Another is introducing the effect of the UV background radiation. These solutions degenerate, but they may be distinguished by studying other properties of galaxies, like the luminosity function, colour distribution, etc. Moreover, we find that the supernova feedback model in the starburst which make the bulge component is important when the star formation time-scale in disc is longer than the age of the Universe. On the other hand, when the star formation time-scale is short, the resulting colour-magnitude relation does not depend on such a starburst model because most of stars are formed not by the burst but by the ordinary star formation process in disc.