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 wanted to load the URL without including the application context name( /myapp/ ) it. It is similar to the problem over here, except it din't work for me. CSS: <style> body { background: url(../img/Background.jpg) no-repeat center center fixed; background-size: cover; } </style> But the above CSS