java - 背景 : url(images/2. png)在 style.css 中不起作用

标签 java css spring jsp

背景: 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/

相关文章:

javascript - 垂直多级菜单 slideToggle

java - 使用 Spring 和注解 @Value 注入(inject)属性

java - 为什么我收到意外 token 错误

java - 存储在数组中的数组被覆盖为最后添加的数组的内容

java - 无法使用 Spring Boot 自动配置访问 REST Controller

java - 无法解析 Intellij 中的符号 Apache

css - 在模态对话框中设置文本框控件的大小

css - 如何去掉按钮点击时的框阴影?

java - 使用java spring和GMail发送电子邮件

JAVA使用循环求0到x的和