The electronic properties of superlattices (SL's) containing a diluted magnetic semiconductor (DMS) as one of the constituents are studied with use of the envelope-function formalism. The effects of Mn d electrons are explicitly included in an effective K.p Hamiltonian. It is shown that the application of the mean-field model to include spin polarization in the DMS layers before calculating SL states is equivalent to the present approach, provided that the energy difference between the valence-band edge and the Mn d bands is large compared with the energy range of the subbands of interest. The results are applied to two SL systems, the experimentally studied CdTe/Cd0.76Mn0.24Te SL and a lattice-matched Zn1-y(Cd)y(Se)/Zn1-x(Mn)x(Se) SL having an energy gap in the blue-green range of the spectrum. The value of the valence-band offset in the former SL is reanalyzed with inclusion of excitonic effects.