  Several classes of conformally-flat and spherically symmetric exact solutions
to the Einstein field equations coupled with either a massless scalar field or
a radiation fluid are given, and their main properties are studied. It is found
that some represent the formation of black holes due to the gravitational
collapse of the matter fields. When the spacetimes have continuous
self-similarity (CSS), the masses of black holes take a scaling form $M_{BH}
\propto (P - P^{*})^{\gamma}$, where $\gamma = 0.5$ for massless scalar field
and $\gamma = 1$ for radiation fluid. The reasons for the difference between
the values of $\gamma$ obtained here and those obtained previously are
discussed. When the spacetimes have neither CSS nor DSS (Discrete
self-similarity), the masses of black holes always turn on with finite non-zero
values.
