-
[ thymeleaf ] ์ด๋ฏธ์ง ๊ฒฝ๋ก ๊ฐ์ ธ์ค๊ธฐ๊ธฐํ 2022. 1. 5. 15:41๋ฐ์ํ

ํผ๋ธ ๋ฐ์์ ๋ ์ด๋ ๊ฒ span tag์ url์ด ์ด๋ ๊ฒ ๋ค์ด๊ฐ ์์๋๋ฐ
<span style="background-image: url(../../assets/images/sample-visual01.jpg)"></span>์ด๋ฏธ์ง๊ฐ ์๊ฐ์ ธ์์ ธ์
<span th:style="'background-image:url('+ @{/images/sample-visual01.jpg} +');'"></span>์ด๋ ๊ฒ ์์ ํ๋ ๊ฐ์ง๊ณ ์๋ค....ใ
์ฐธ์กฐ : https://stackoverflow.com/questions/35789526/how-to-set-background-url-for-css-files-in-thymeleaf
How to set background url for css files in thymeleaf?
I have a thymeleaf template where I don't have CSS files imported and wanted to declare style attribute for the body element with background-image: url{/image.jpg} property with relative image URL. I
stackoverflow.com
๋ฐ์ํ'๊ธฐํ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ