Three-dimensional atomic force microscopy (3D-AFM) plays a critical role in true 3D measurement, which is potentially required in the manufacture of integrated circuits and in materials science. However, obtaining a 3D profile from a single scan is still a challenge because the probe has to be adjusted to a proper state to measure unknown features. So 3D-AFM is usually time consuming due to repeated scanning in the same area. Here we propose a new scanning strategy, called adaptive-angle scanning, in which the approaching angle of the probe is updated to an appropriate value according to the local surface gradient that is estimated in real time. Meanwhile, the fast scan direction is switched between the y -axis and the z-axis to realize the measurement of top-bottom features and sidewalls. This method is incorporated in a homemade 3D-AFM system to demonstrate its application. Two feedback loops, one integrated in the AFM head and the other under the sample stage, are responsible for changing the approach angle. Experiments are carried out on some standard samples with a tailored CD probe. The 3D-AFM system performs with excellent repeatability on the measurement of the line structure. There is no obvious tip wear observed after continuously scanning 20 times, and the obtained 3D images validate well the method's capability of measuring different structures.