  We study the energy spectrum and electronic properties of graphene in a
periodic magnetic field of zero average with a symmetry of triangular lattice.
The periodic field leads to formation of a set of minibands separated by gaps,
which can be manipulated by external field. The Berry phase, related to the
motion of electrons in $k$ space, and the corresponding Chern numbers
characterizing topology of the energy bands are calculated analytically and
numerically. In this connection, we discuss the anomalous Hall effect in the
insulating state, when the Fermi level is located in the minigap. The results
of calculations show that in the model of gapless Dirac spectrum of graphene
the anomalous Hall effect can be treated as a sum of fractional quantum
numbers, related to the nonequivalent Dirac points.
