Two-dimensional electrons in a magnetic superlattice