【问题标题】:I cannot add local css to thymeleaf - but adding bootstrap and jquery works我无法将本地 css 添加到 thymeleaf - 但添加 bootstrap 和 jquery 有效
【发布时间】:2022-01-02 20:08:04
【问题描述】:

Error Message From Dev Tools

The Folder Structure of the project

How I linked this

所以我正在尝试将本地 css 文件链接到 thymeleaf,但它一直没有工作。我想知道在这种情况下如何将 css 链接到 thymeleaf。谢谢。

【问题讨论】:

标签: spring spring-boot thymeleaf


【解决方案1】:

您正在使用href="@{/css/signup.css}",但您需要像这样使用th:href

<link rel="stylesheet" th:href="@{/css/signup.css}" />

【讨论】:

猜你喜欢
  • 2018-07-15
  • 2016-12-05
  • 2014-11-27
  • 2017-09-24
  • 2015-10-20
  • 1970-01-01
  • 2018-04-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多