日期:2014-05-18  浏览次数:20497 次

页面中为什么不能设置背景图片了
background: url(images/biaoG.png);这句话对吗?为什么不能显示图片了.我的images文件夹在根目录下.css其它的样式都能显示.把上面改成背景颜色都能显示.我新建的主题中添加的css样式.
background: url(../images/biaoG.png);background: url(../../images/biaoG.png);background: url(./images/biaoG.png);我都试过不行.格式怎么写啊.我看人家的源码background: url(images/biaoG.png);写都可以.我哪个地方写错了吗?

------解决方案--------------------
background-image: url(/images/biaoG.png);
------解决方案--------------------
../images/biaoG.png路径是相对于.css文件,而不是相对于.html文件