Html 多个CSS背景

Html 多个CSS背景,html,css,Html,Css,我有3个背景图像和一种颜色,我想放在一个模拟网页上,但是我根本无法让它们显示出来,以下是我正在使用的css: body{ #FF0, url(../Pictures/midal_foot_img_lg.png) bottom center no-repeat, url(../Pictures/banner.png) center no-repeat, background:url(../Pictures/header2.png) top center no-rep

我有3个背景图像和一种颜色,我想放在一个模拟网页上,但是我根本无法让它们显示出来,以下是我正在使用的css:

body{
    #FF0,
    url(../Pictures/midal_foot_img_lg.png) bottom center no-repeat,
    url(../Pictures/banner.png) center no-repeat,
    background:url(../Pictures/header2.png) top center no-repeat;
}

我认为您的语法不正确,请尝试以下方法:

body {
    background: 
       url(../Pictures/midal_foot_img_lg.png) bottom center no-repeat,
       url(../Pictures/banner.png) center no-repeat,
       url(../Pictures/header2.png) top center no-repeat;
    background-color: #FF0;
}

Css属性名称必须在值之前。以你的背景来说。你们也可以看看巴尼所指的问题

   body{
       background:            
       url(../Pictures/midal_foot_img_lg.png) bottom center no-repeat,
       url(../Pictures/banner.png) center no-repeat,
       url(../Pictures/header2.png) top center no-repeat,
       #FF0
   }

尝试删除
#FF0
之后的
,背景色的可能副本需要放在最后,否则将被覆盖。将背景色声明移到下面,或将
#FF0
置于背景值的最末端。