重复背景不显示

时间:2015-01-13 22:28:16

标签: html css

好的,这是我在css体验中遇到的最奇怪的问题之一。我正在尝试使用一些在我的网页上重复div的微妙模式。奇怪的是,每当我尝试设置非常白的模式时,浏览器都会拒绝加载图像。当我尝试使用较暗的图像时,它可以正常工作。现在我知道颜色显然不是问题,但我错过了什么。这是HTML / CSS:

#section1{
background-image: url("../images/as.png");

}

    <div id="section1">
     <div class="content98">
      <h1 id="h1d">De ce matest.ro?</h1>
       <div id="border">
        <img class="show" id="show1" src="images/untitled-2.png">
        <h2 id="dix">Obiective</h2>
        <hr>
        <div id="hided1"><p class="hiding">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer tellus lorem, feugiat ut condimentum ac, ultricies vitae nibh. Duis sed lacinia magna.>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
        </div>
    <br><br>
    </div>

1 个答案:

答案 0 :(得分:0)

首先检查您的body background color白色或更改并查看。然后在样式框中检查浏览器中检查您的属性是否为删除的元素。

#section1{
background-image: url("../images/as.png");
}

然后将background-repeat:repeat;添加到您的图片中。

#section1{
background-image: url("../images/as.png");
background-repeat:repeat;
}

即使这样,你也可以写

#section1{
background:url("../images/as.png") repeat;
}