背景: url(images/2.png) in file style.css (located in web-app/static/styles/style.css ) cannot load picture 2.png located in web-app/static/images/2 .png .我正在使用 spring 框架
最佳答案
这意味着您的图像位于样式文件夹中的图像文件夹中,即样式 -> 图像 -> 2.png
我建议尝试 ../images/2.png 返回一个文件夹,如果你的图像文件夹在静态文件夹内,即 static -> images -> 2.png
关于java - 背景 : url(images/2. png)在 style.css 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29377812/