需要在父模版中引用css样式文件的时候使用绝对路径,不能使用相对路径: <link rel="stylesheet" type="text/css" href="../static/css/hotelapp.css">