简体   繁体   English

在重复的身体背景图象下的白色空间

[英]White Space below repeated body background image

I'm new to the programming world and have been experimenting to try and learn more. 我是编程世界的新手,并且一直在尝试尝试学习更多东西。 I'm creating a custom facebook tab using the static html i-frame application and keep running into an issue when repeating the body background image vertically. 我正在使用静态html i-frame应用程序创建自定义facebook选项卡,并在垂直重复体背景图像时继续遇到问题。 For a reason I cannot figure out, the image has a white gap between it and the repeated image. 由于我无法弄清楚的原因,图像与重复图像之间存在白色间隙。 Any help would be much appreciated! 任何帮助将非常感激!

Here is the code: 这是代码:

    body {
    background-image:url('http://i1187.photobucket.com/albums/z389/mawler023/FBTabBody.png');
    margin:0;
    padding:0;
    background-position:right top;
    background-attachment: fixed;
    background-repeat:repeat-y;
    width:810px; 
    color: #333333;
    font-family: Verdana, Geneva, sans-serif;
    }`

The image you are using (http://i1187.photobucket.com/albums/z389/mawler023/FBTabBody.png) has a band of white at the top of it (a rough measure said it was about 123px in height). 您正在使用的图像(http://i1187.photobucket.com/albums/z389/mawler023/FBTabBody.png)顶部有一条白色带(粗略表示它的高度约为123像素)。 This is going to be showing on every repetition causing the gap you are observing. 这将显示每次重复导致您观察到的差距。

You'll want to just trim the image and it should get rid of the gap. 你只想修剪图像,它应该摆脱差距。

If you want to have a white area at the top of the page (but not on repetitions) you are best off either reducing the area that you apply the background or putting an explicit white background on an element at the top. 如果你想在页面顶部有一个白色区域(但不是重复),最好减少应用背景的区域或在顶部的元素上放置明确的白色背景。

因为图像本身顶部有一个巨大的白色空间

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM