多个css背景不工作

多个css背景不工作,css,background-image,Css,Background Image,我试着在这样一个div中使用3个背景 .leftcontent { padding: 0 20px; padding-bottom: 35px; width: 615px; margin-right: 30px; background: url('../images/primary_content_bottom_item31.gif') bottom left no-repeat, url('../images/primar

我试着在这样一个div中使用3个背景

.leftcontent
{
    padding: 0 20px;
    padding-bottom: 35px;
    width: 615px;
    margin-right: 30px;
    background:
        url('../images/primary_content_bottom_item31.gif') bottom left no-repeat,
        url('../images/primary_content_bg.gif') repeat-y,
        url('../images/primary_content_bg2.gif') top left no-repeat;
}
.left
{
    float: left;
}
问题是背景图像不显示

但是,当我删除前两个背景时,它会显示(
primary\u content\u bottom\u item31.gif
primary\u content\u bg.gif

这是我的HTML:

<div class='left leftcontent'>
    <h1>Lottery</h1>
    <p>The Brookvale Lottery was set up in 1976 to help raise money for the building of our Village Hall. Today, the lottery raises funds for the day to day running and upkeep of the Hall. In 2012, as well as paying out to Brookvale residents, it also paid for the purchase and installation of security fencing at the Hall.</p>
    <p>The Lottery is open to all residents of Brookvale over 16.</p>
    <h2 class=center><strong>1st Prize - &pound;50</strong></h2>
    <h2 class=center><strong>2nd Prize - &pound;30</strong></h2>
    <h2 class=center><strong>3rd Prize - &pound;20</strong></h2>
    <p>To find out how the lottery works, see Rules of Play.</p>
</div>

彩票抽奖
布鲁克维尔彩票成立于1976年,旨在帮助筹集资金建造我们的村会堂。今天,彩票为大厅的日常运行和维护筹集资金。2012年,除了支付布鲁克维尔居民的费用外,它还支付了大厅安全围栏的购买和安装费用

该彩票向布鲁克维尔所有16岁以上的居民开放

一等奖-£;50 二等奖-£;30 三等奖-£;20 要了解彩票是如何运作的,请参阅游戏规则


您定义的第二个背景显示在最后一个背景的上方。这应该起作用:

background:
    url('../images/primary_content_bottom_item31.gif') bottom left no-repeat,
    url('../images/primary_content_bg2.gif') top left no-repeat,
    url('../images/primary_content_bg.gif') repeat-y;

定义图像的顺序是图像的显示顺序。前面定义的背景显示在后面定义的背景之上。

第二个定义的背景显示在最后一个背景之上。这应该起作用:

background:
    url('../images/primary_content_bottom_item31.gif') bottom left no-repeat,
    url('../images/primary_content_bg2.gif') top left no-repeat,
    url('../images/primary_content_bg.gif') repeat-y;

定义图像的顺序是图像的显示顺序。前面定义的背景显示在后面定义的背景之上。

第二个定义的背景显示在最后一个背景之上。这应该起作用:

background:
    url('../images/primary_content_bottom_item31.gif') bottom left no-repeat,
    url('../images/primary_content_bg2.gif') top left no-repeat,
    url('../images/primary_content_bg.gif') repeat-y;

定义图像的顺序是图像的显示顺序。前面定义的背景显示在后面定义的背景之上。

第二个定义的背景显示在最后一个背景之上。这应该起作用:

background:
    url('../images/primary_content_bottom_item31.gif') bottom left no-repeat,
    url('../images/primary_content_bg2.gif') top left no-repeat,
    url('../images/primary_content_bg.gif') repeat-y;

定义图像的顺序是图像的显示顺序。早期定义的内容显示在后期定义的内容上方。

适用于我适用于我适用于我适用于我适用于我,非常感谢您的修复和解释!工作完美,非常感谢修复和解释!工作完美,非常感谢修复和解释!工作完美,非常感谢修复和解释!