0
我用一個「頭」片段與Thymeleaf存儲我的CSS鏈接。我可以改變Thymeleaf「包含」優先權嗎?
我也有一個獨特的css文件,我想只適用於給定的頁面。我第一次嘗試做到這一點是下面的方法。
<head th:include="fragments/head :: head">
<link rel="stylesheet" th:href="@{/css/create-post.css}" />
</head>
但是似乎從片段中的CSS文件插入下head標籤的當前內容。這是一個問題,因爲在create-post.css中希望重寫一些樣式。
有沒有辦法改變Thymeleaf如何插入頭標籤的優先順序?