2015-01-13 109 views
0

好的,这是我在我的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> 

+0

你将有一个拨弄重新创建此。白色时你不能看到它的问题? – jmore009

+2

@ jmore009为什么小提琴? SO有这个功能,你也知道;) – Madbreaks

+0

我主要用它来表示“发布一个工作示例”,并不一定是小提琴 – jmore009

回答

0

首先检查你的bodybackground 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; 
}