Professional courses are the most important support for ideological and political education, and the ideological and political demonstration courses will play a leading role in implementing morality and cultivating people. Taking the national first-class undergraduate course and the ideological and political demonstration course “Structural Mechanics” as an example, this paper discusses the effective integration of professional course teaching and curriculum ideology and politics from the aspects of the overall design , the mining of ideological and political elements, and the practical ways of ideological and political construction (including mixed teaching mode, innovative practical application and comprehensive assessment mode), so as to achieve the trinity education goal of knowledge transfer, ability training and value guidance.