Refused to apply style from '.../bootstrap.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

在页面引入了bootstrap:

但是控制台报错如下:

 解决方案:

这个问题出现的场景是在node环境下使用express框架的静态资源访问,加上下面的代码即可:

 同时要保证这个要访问的静态资源在public目录下即可解决。

猜你喜欢

转载自www.cnblogs.com/Guorisy/p/12633952.html