我爱编程

thymeleaf在引用css样式时,首次访问不加载

2018-07-26  本文已影响0人  _灯火阑珊处

thymeleaf在页面head中引用link标签时,需要按照thymeleaf规则来进行引用,否则会出现首次加载时,css不引用的问题

<link rel="stylesheet" href="/css/index.css" th:href="@{/css/index.css}"/>
thymeleaf引用link.png
上一篇 下一篇

猜你喜欢

热点阅读