In a method and magnetic resonance apparatus for selective excitation of
nuclear spins of an examination region in an examination subject using at
least one radio-frequency excitation pulse and using slice-selective
magnetic fields, the slice-selective magnetic field gradients are
selected dependent on the position of the examination region relative to
at least one structure surrounding the examination region.