在CSS文件中:
body {
background-image: url('../image/body_bg.png');
margin: 0 0 0 0;
width: 500px;
height: 300px;
}
我确定 url 路径是正确的。
“body_bg.png”在 IE 和 firefox 浏览器中显示,但在 Chrome 中不显示。我的 chrome 版本是 22.0.1229.94
最佳答案
改变
background-image: url('../image/body_bg.png');
到
background-image: url('image/body_bg.png');
可能有帮助
关于html - 为什么 css 文件中的背景图像 url 在 chrome 中不起作用,但在 IE 和 firefox 中正常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12882886/