F12 can be loaded into a css file, but viewing the corresponding div does not apply the stylesheet

can be loaded into css resources, but not applied to the corresponding div in a web page.

clipboard.png

reported the corresponding warning and checked the information. Some said it was related to the filter on the web side, and also modified the relevant configuration, all of which had no effect
< link href= " https://cdn.bootcss.com/font-...;. Rel= "stylesheet" / >
is there any problem with the css introduced in this cdn way
environment is: tomcat8+jdk8,ssm framework

Jul.06,2022

check your tomcat/conf/web.xml and web.xml under your application
to see the mime configuration related to css. Normally, it should be as follows

<mime-mapping>
    <extension>css</extension>
    <mime-type>text/css</mime-type>
</mime-mapping>

that is, the text/css type should be returned, and this extension may also be overloaded by the configuration of spring mvc, so the configuration related to css in mvc should also be checked.

Menu