不加载CSS背景图片 [英] CSS Background image not loading

查看:244
本文介绍了不加载CSS背景图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照所有的教程,这是所有说的东西说的。我指定我的背景的身体在我的CSS样式表内,但页面只显示一个空白的白色背景。图片是在同一目录中的.html和页面的CSS。本教程说,

 <车身背景=image.jpeg>

是德precated,所以我用,在CSS中,

  {体背景:网址('image.jpeg');}

没有成功。
这里是整个CSS样式表:

 
{
背景图像:网址('nickcage.jpg');
填充左:11em;
填充右:20em;
字体系列:
格鲁吉亚,宋体,
时报衬线;
颜色:红色;
}


解决方案

下面是另一幅图像的URL result..working罚款...我只是把只有图像path..please检查。

Fiddel: http://jsfiddle.net/287Kw/

 
{
背景图像:网址('http://www.birds.com/wp-content/uploads/home/bird4.jpg');
填充左:11em;
填充右:20em;
字体系列:
格鲁吉亚,宋体,
时报衬线;
颜色:红色;
}

I have followed all of the tutorials, which all say the say thing. I specify my background inside of body in my css style sheet, but the page just displays a blank white background. Image is in the same directory as the .html and the .css pages. The tutorial says that

<body background="image.jpeg">

is deprecated, so I use, in css,

body {background: url('image.jpeg');}

no success. Here is the entire css style sheet:

body 
{
background-image: url('nickcage.jpg');
padding-left: 11em;
padding-right: 20em;
font-family:
Georgia, "Times New Roman",
Times, serif; 
color: red;        
}

解决方案

here is another image url result..working fine...i'm just put only a image path..please check it..

Fiddel:http://jsfiddle.net/287Kw/

body 
{
background-image: url('http://www.birds.com/wp-content/uploads/home/bird4.jpg');
padding-left: 11em;
padding-right: 20em;
font-family:
Georgia, "Times New Roman",
Times, serif; 
color: red;


}

这篇关于不加载CSS背景图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆