[英]The background picture does not appear on my site
My background does not appear on my site :我的背景没有出现在我的网站上:
.bg-dispersed {
background-image: url("/images/jpg/bg_dispersed.jpg");
}
.bg-00 {
background-image: url("/images/jpg/bg_home.jpg");
}
what is strange is that locally, it works.奇怪的是,它在本地有效。
Here is the URL of my site : https://overlap.ulb.be/public/这是我网站的网址: https ://overlap.ulb.be/public/
I have no error in the Firefox console.我在 Firefox 控制台中没有错误。
I have this in my .env file :我的 .env 文件中有这个:
ASSET_URL=https://overlap.ulb.be/public
The picture is inside the folder...图片在文件夹里面...
In your css you have: background-image: url("images/jpg/bg_home.jpg");
在您的 CSS 中,您有: background-image: url("images/jpg/bg_home.jpg");
But you need但是你需要
background-image: url("../images/jpg/bg_home.jpg");
The path in style.css is relative to the css folder, not to the root. style.css 中的路径是相对于 css 文件夹的,而不是相对于根目录的。
Possible solutions:可能的解决方案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.