线条显示时图像显示错误

时间:2013-03-11 05:14:01

标签: html

![在此处输入图片说明] [1]我遇到了问题。我放入背景的图像分为四部分。标题,body1,body2和页脚。我的问题是当body1和body2连接在一起时,图像中有一条线。当我重复时,这也适用于body2,线在底部。问题是当div中的一个图像显示另一个图像之后,在它们之间出现一条线 这是我的代码:

<div id="header" 
        style="background-image:url('Graphic/banner.png'); height: 84px;">    
    </div>
    <div id="Body1" 
        style="background-image:url('Graphic/topper.png'); height: 364px;" >    
    </div>
    <div id="Body2" 
        style="background-image:url('Graphic/body.png'); height: 364px;">    
    </div>
    <div id="Footer" 
        style="background-image:url('Graphic/footer.png'); height: 82px;">    
    </div>

知道怎么让这条线消失吗?

1 个答案:

答案 0 :(得分:0)

试试这个:这里我的div之间没有空格,确保没有 图像上有空白区域。

<html>
<head>
<title></title>
</head>
<body>
<div id="header" 
        style="background-image:url('#'); background-color: #EBC64D; height: 84px;">    
    </div>
<div id="container">    
    <div id="Body1" 
        style="background-image:url('#'); background-color: #07ED5F; height: 364px;" >    
    </div>

    <div id="Body2" 
        style="background-image:url('#'); background-color: #2E16A8; height: 364px;">    
    </div>
</div>  
    <div id="Footer" 
        style="background-image:url('#'); background-color: #E01B6A; height: 82px;">    
    </div>
</body>
</html>