  We develop a novel approach to measure dust attenuation properties of
galaxies, including the dust opacity, shape of the attenuation curve and the
strength of the 2175{\AA} absorption feature. From an observed spectrum, the
method uses a model-independent approach to derive a relative attenuation
curve, with absolute amplitude calibrated using NIR photometry. The
dust-corrected spectrum is fitted with stellar population models to derive the
dust-free model spectrum, which is compared with the observed SED/spectrum from
NUV to NIR to determine dust attenuation properties. We apply this method to
investigate dust attenuation on kpc scales, using a sample of 134 galaxies with
integral field spectroscopy from MaNGA, NIR imaging from 2MASS, and NUV imaging
from Swift/UVOT. We find the attenuation curve slope and the 2175{\AA} bump in
both optical and NUV span a wide range at kpc scales. The slope is shallower at
higher optical opacity, regardless of the specific star formation rate (sSFR),
minor-to-major axis ratio (b/a) of galaxies and the location of spaxels within
individual galaxies. The 2175{\AA} bump presents a strong negative correlation
with the sSFR, while the correlations with the optical opacity, b/a and the
location within individual galaxies are all weak. All these trends appear to be
independent of the stellar mass of galaxies. Our results support the scenario
that the variation of the 2175{\AA} bump is driven predominantly by processes
related to star formation, such as the destruction of small dust grains by UV
radiation in star-forming regions.
