Vertical and horizontal comparison is the main teaching method of the ideological and political theory courses. Using this teaching method is conducive to enhancing students' interest in learning and promoting students' understanding and mastery of theoretical knowledge. We should pay attention to the comprehensive and multi-level application of horizontal comparison and vertical comparison, grasp the “three dimensions” of vertical and horizontal comparison, and have height, depth and temperature in comparison. Moreover, we should not deviate from Marxism and socialism, from the nature of ideological and political course, and from the law of teaching, so as to enhance the pertinence, affinity and appeal of teaching, improve the teaching quality of ideological and political course, educate and guide students to establish a correct outlook on world, life and values.