背景图像未在 WordPress 主题上呈现
主题说明了一切。我已将其设置为...
body{
background-image:url('images/bg.gif');
background-repeat:repeat-x repeat-y;
}
似乎无法弄清楚为什么它不在后台渲染。总的来说,我对 WordPress 主题很陌生。有人可以帮我吗?我在下面发布了完整内容的链接。
Topic explains it all. I've got it set as...
body{
background-image:url('images/bg.gif');
background-repeat:repeat-x repeat-y;
}
Can't seem to figure out why it's not rendering in the background. I'm new to wordpress themeing in general. Could anyone help me out? I've posted a link to the content in full below.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
行前面看到一些垃圾字符
body{ background-image:url('images/bg.gif');
在样式表中,我在 css 文件中的 。这些可能会使渲染跳过规则。我会退格并清理它。
In the style sheet, I see some garbage characters right in front of the
body{ background-image:url('images/bg.gif');
line in the css file. Those might be making the rendering skip the rule. I'd backspace and clean that up.
看起来您的背景图片位于此处:
因此,首先尝试像这样的绝对地址:
但是,如果这有效,您确实需要一个相对 URL,因此请查看主题的目录结构并确保背景图像确实与您编写该规则的 css 文件相关,按照您编写的方式。
It looks like you background image is located here:
So first of all try an absolute address like so:
However if that works, you really want a relative URL, so take a look at the directory structure of your theme and ensure the background image is indeed relative to the css file you have written that rule in, in the way you have written.
检查您是否已将正确的图像上传到正确的位置。当我尝试查看图像时,我可以看到一个非常小且透明的图像。 http://www.aidanchurch.com/blog/wp -content/themes/bloo_06/images/bg.gif 。
Check that you have uploaded the correct image to the correct place. When I tried to view the image I could see a very small and transparant image. http://www.aidanchurch.com/blog/wp-content/themes/bloo_06/images/bg.gif .