我试图在我的 css 中包含 PIE.htc (http://www.css3pie.com/) 文件以解决 IE 中的一些问题。我包括这条线
behavior: url(/static/pie/PIE.htc);
对于相关的类。这似乎没有加载。
从阅读中,似乎我需要添加 MIME 类型
text/x-component
对于我使用 Flask 的 Heroku 应用程序上的 .htc 文件。
有人对如何做到这一点有任何想法吗?
谢谢。
更新:
我认为可能类似于以下内容的东西会起作用,但似乎不行。
@app.route('/PIE.htc')
def pie():
handle = open('static/pie/PIE.htc','r+')
return Response(handle, mimetype = 'text/x-component')