图像文件(a1.jpg)存在于同一文件夹中。但是它没有显示出来,只有字体的颜色变白了。
有人能解释一下为什么和如何修复它吗?
<style type="text/css">
p,h1,h2,h3,h4 {
font-family: Verdana, Geneva, sans-serif;
color: white;
}
a {
text-decoration: none;
}
body {
background-image: url('a1.jpg');
}
th,td {
font-family:Arial, Helvetica, sans-serif;
color:white;
}
</style>发布于 2014-01-25 21:14:49
如果标题正确,则需要在图像之前设置背景色。
我不清楚你在问什么.你想要背景色和图像吗?
background: #ffffff;
background-image: url('a1.jpg');发布于 2014-01-25 21:30:44
The image file (a1.jpg) is exist and in the same folder ...
在哪个文件夹里呢?html页面的文件夹,还是CSS文件的文件夹?仅当图像与CSS文件位于同一文件夹中时,该路径才有效。
发布于 2016-07-05 05:55:50
背景图像的值应该类似于下面的形式,并且应该在相同的文件夹中:
background-image:url(../img/1.jpg);https://stackoverflow.com/questions/21351004
复制相似问题