We numerically investigate the dynamical and chemical processes of the formation of elliptical galaxies in a cold dark matter (CDM) universe in order to understand the origin of the mass dependence of the photometric properties of elliptical galaxies. Our three-dimensional tree N-body/smoothed particle hydrodynamics numerical simulations of elliptical galaxy formation take into account both Type II and Type Ia supernovae (SNe II and SNe Ia, respectively) and follow the time evolution of the abundances of several chemical elements (C, O, Ne, Mg, Si, and Fe). Moreover, we compare different strengths of SNe feedback. In combination with stellar population synthesis, we derive the photometric properties of simulation end products, including the magnitude, color, half-light radius, and abundance ratios, and compare them with the observed scaling relations directly and quantitatively. We find that the extremely strong influence of SNe is required to reproduce the observed color-magnitude relation, when we assume each SN yields energy of 4×1051 ergs and that 90% of this energy is ejected as kinetic feedback. The feedback affects the evolution of lower mass systems more strongly and induces the galactic wind by which a larger fraction of gas is blown out in a lower mass system. Finally, higher mass systems become more metal-rich and have redder colors than lower mass systems. We emphasize, based on our simulation results, that the galactic wind is triggered mainly by SNe Ia rather than SNe II. In addition, we examined the Kormendy relation, which prescribes the size of elliptical galaxies, and the [Mg/Fe] magnitude relation, which provides a strong constraint on the star formation history.