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:

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.

但是控制台报错如下:

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.

 

 解决方案:

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

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.

 

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

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.

上一篇:android studio无法识别模拟器问题解决


下一篇:角色移动优化【Unity2D自学之路】