这段代码有什么问题?显示白色背景而不是图像

时间:2016-08-03 08:10:24

标签: html css

我使用bootstrap。我的CSS在这里。它仅显示此图像内的白色背景。

Image i am  using here is

.container-header
    {
        max-width:1000px;
        background:url(../images/header-secondrow-new.png);
        background-repeat: repeat-y;
        background-size: 100%;
    }

2 个答案:

答案 0 :(得分:0)

你的css代码中没有高度值你没有给出高度值,也没有在你看不到任何内容的元素中添加任何内容。尝试将height:100px添加到css类。

答案 1 :(得分:0)

试试这个:

background-image: url(../images/header-secondrow-new.png);
background-repeat: repeat;
background-position: center top;