0
我想Thymeleaf(春季啓動4和Thymeleaf 2.X)在我的應用程序,但有此分析錯誤:Thymeleaf級風格
th:style="'background-image: url('[email protected]̣{css/nema/neder-e.png}+');'"
我想這點?
我想Thymeleaf(春季啓動4和Thymeleaf 2.X)在我的應用程序,但有此分析錯誤:Thymeleaf級風格
th:style="'background-image: url('[email protected]̣{css/nema/neder-e.png}+');'"
我想這點?
@和{在你的表達式中有一些奇怪的字符。我不知道它們是什麼(十六進制中的CCA3?),但表達式本身在刪除後是有效的。
試試這個
th:style="'background-image:url(' + @{'/css/nema/neder-e.png' + ');'"
爲什麼要下來投票呢?可以爲它寫任何合理的東西嗎? – kamaci
是不是你缺少網址的引號? url的實際值需要引號。 –