从网页顶部删除矩形

时间:2014-02-25 05:38:52

标签: html css html5 css3

这个花了很多时间,因为我无法理解与之相关的问题。我仍然是CSS的新手,并且完全不了解这个问题。

这是来自CSS的一段代码,它控制着网页的背景

#intro1 {
    height:1000px;
    background: #000 url('../innerimages/slide4.jpg');
    background-position:center 0px;
    background-repeat:no-repeat;
    background-size:cover;
}

此时网页看起来像这个enter image description here

现在如果我将颜色改为fff.i.e

#intro1 {
    height:1000px;
    background: #fff url('../innerimages/slide4.jpg');
    background-position:center 0px;
    background-repeat:no-repeat;
    background-size:cover;
}

页面看起来像enter image description here

这是html部分

<div id="verticalScrollArea" style="display: block; top: -65.27584886649873px;">
    <section id="intro1" data-navigation-tag="About SVP 69" style="display: block;        background-position: 100% 44.8228px;">
          <div id="intro1content" class="content" style="display: block; margin-top: 61.86937866666666px;">
        <div class="contentData"> <div class="background">SOME TEXT <br>
              <a href="http://69svp.in/about.html"><img src="./69 SVP_files/know-more.png"></a> 
</div> </div>
        <div class="scrollDown"> <span>SOME TEXT</span> <img src="./69 SVP_files/scroll-down.png"></div>
      </div>
        </section>

我想要的是全屏图像。我无法弄清楚我在去除背面/白色条带时出错了什么地方? 如何删除

enter image description here

4 个答案:

答案 0 :(得分:1)

您必须从margin-top的{​​{1}}移除#intro1,您可以使用inline CSS代替padding-top

答案 1 :(得分:0)

问题是由这行代码引起的:

<div id="intro1content" class="content" style="display: block; margin-top: 61.86937866666666px;">

具体来说,您内联应用的margin-top会导致此彩色条带显示。只需删除此内联css for margin-top。

答案 2 :(得分:0)

有这个ID:

删除margin-top:61.86937866666666px;

答案 3 :(得分:0)

enter image description here我没有发现标题部分有任何问题。我只看到一个小故障,出现了一条白色的怪线。为了更好的解释,请查看屏幕截图。enter image description here

让我知道这是你想要的吗?

好吗,你想这样吗?检查更新截图?