我想设置一个background-image
,但它没有显示在我的网站上。我尝试设置 display: block;
但没有成功。
body {
background-image: url("images/other/background.png");
margin: 0;
}
最佳答案
您可能走错了路。如果你的 CSS 文件在/css 中,而你的图像文件在/image 中,你应该使用
background-image: url("/images/other/background.png");
关于html - 我的背景图片没有出现在我的网站上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56029562/