解决方法:实例化时,设置静态文件夹和静态路径 app = Flask(__name__, static_folder="templates",static_url_path='') #设置静态文件夹和静态文件路径