html - wrapper 背景未延伸至封面高度

标签 html css

我正在使用一个模板,我们在 wrapper 中有一个背景图片,但是当我从 13 英寸笔记本电脑屏幕上查看网站时,文本延伸到折叠下方, wrapper 仅覆盖折叠上方,因此我的内容没有正确显示。

我该如何解决这个问题?更好的是,我怎样才能使我的内容适合首屏。

JSFiddle 链接:http://jsfiddle.net/L72wwz7g/

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>COMPANYNAME Photo Contest</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
    <link href="css/style.css" rel="stylesheet" />
    <link href="css/colors/style-color-01.css" rel="stylesheet" />
    <link rel="stylesheet" href="css/contact.css" />
    <link rel="stylesheet" href="css/simple-line-icons.css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700' rel='stylesheet' type='text/css' />
  </head>
  <body>
  <div id="wrapper">
    <!-- Start Header -->
    <div id="header">
      <div class="container">
        <div class="row">
          <div class="span12">
            <h1>
              <a href="#">
                <img src="images/logo.png" alt="COMPANYNAME" />
              </a>
            </h1>
            <h2 class="menulink">
              <a href="#">Menu</a>
            </h2>
            <!-- Start Menu -->
            <div id="menu">
              <ul>
                <li>
                  <a href="index.html">HOME</a>
                </li>
                <li>
                  <a href="#categories">PHOTO CATEGORIES</a>
                </li>
                <li>
                  <a href="#tips">PHOTOGRAPHY TIPS</a>
                </li>
                <li>
                  <a href="#rules">CONTEST RULES</a>
                </li>
                <li class="current">
                  <a href="https://COMPANYNAME.wufoo.com/forms/COMPANYNAME-photo-contest/" target="_blank">ENTRY FORM</a>
                </li>
              </ul>
            </div>
            <!-- End Menu -->
          </div>
          <div class="clearfix"></div>
        </div>
      </div>
    </div>
    <!-- End Header -->
    <!-- Start Content -->
    <div class="container">
      <div class="row">
        <div class="span6">
          <div class="inner">
            <br />
            <br />
            <br />
            <br />
            <br />
            <br />
            <center>
              <h1 style="color: #464f56">SHOW US YOUR 
              <b>BEST BEFORE AND AFTER</b> PHOTOS AND 
              <b>WIN PRIZES</b> IN THE COMPANYNAME PHOTO CONTEST</h1>
            </center>
            <p>The COMPANYNAME user community is a source of inspiration to us; your remarkable Before &amp; After photos demonstrate the artistry that goes along with the science and technology to create striking results that change lives. To recognize our COMPANYNAME users and encourage you to show off your results, we&#39;re inviting you to enter your best Before &amp; After photos into our photo contest.</p>
            <p>Before &amp; After images are a clear and dramatic way to tell your best patient stories. The COMPANYNAME Photo Contest is a celebration of these patient stories, and an invitation to you to share your results with the COMPANYNAME community.</p>
          </div>
        </div>
        <div class="span6">
          <div class="inner">
            <br />
            <br />
            <br />
            <br />
            <img src="images/b-a-stacked.png" />
            <br />
            <br />
            <span style="color: #464f56; font-size: 3em;">
              <b>Prizes:</b>
            </span>
            <br />
            <h2 style="color: #ffffff">
              <b>4 First place Prizes!</b>
            </h2>
            <h3 style="color: #ffffff">
              <b>$1,000 + Join the COMPANYNAME Facebook Wall of Fame!</b>
            </h3>
            <h3 style="color: #ffffff">
              <b>In addition, choose:</b>
            </h3>
            <ul>
              <li>
                <span style="color: #ffffff;">
                  <b>A night out on the town</b>
                </span>
              </li>
              <li>
                <span style="color: #ffffff;">
                  <b>A chair-massage therapy for a day</b>
                </span>
              </li>
              <li>
                <span style="color: #ffffff;">
                  <b>$1,000 worth of Top Flight points</b>
                </span>
              </li>
            </ul>
            <h3 style="color: #ffffff">
              <b>All photos we keep to use are worth $500!</b>
            </h3>
            <p style="font-size:12px">See 
            <a href="#terms">Terms and Condition</a> for full details</p>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>
    <!-- End content -->
    <div class="clearfix"></div>
  </div>
  <div class="strip features">
    <div class="container">
      <div class="row">
        <br />
        <a name="categories"></a>
        <h2 style="color: #0658a0">We invite you to submit Before &amp; After photographs in these categories:</h2>
        <ol>
          <li>
          <b>Benign Lesions</b>, such as Angiofibromas, Cutaneous Horn, Milia, Sebaceous Hyperplasia, Skin Tags, Syringoma and Xanthelasma</li>
          <li>
          <b>Benign Pigmented Lesions</b>, such as Benign Nevi, Dermatosis Papulosa Nigra and Keratoses</li>
          <li>
          <b>Other Dermatological Conditions</b>, such as Active Acne, Melasma, Poikiloderma, Rhinophyma, Rosacea, Port Wine Stain, Scars and Warts</li>
          <li>
          <b>Aesthetic Treatments</b>, such as Forever Bare Hair Removal, Forever Young BBL, Pores, Resurfacing, SkinTyte and Vertical Lip Lines</li>
        </ol>
        <br />
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
  <a name="rules"></a>
  <div class="strip highlight strip-alt">
    <div class="container">
      <div class="row">
        <div class="span6">
          <div class="inner">
            <h2 style="color: #0658a0">Rules:</h2>
            <ul>
              <li>Please send before and after photos taken at the same angle, with the same lighting.</li>
              <li>Please include condition treated, modality used, settings, number of treatments, and how long after the treatment the photo was taken</li>
              <li>Photos submitted need to be 
              <a href="http://www.COMPANYNAME.com/sites/default/files/temp/2008-062-01%20Rev%20A%20Patient%20Photo%20Release%20Form.pdf" target="_blank">photo-released</a>. We may use your photo in upcoming campaigns!</li>
            </ul>
            <p>Please feel free to enter as many photos as you&#39;d like. Good luck! We&#39;re looking forward to seeing your photos!</p>
          </div>
        </div>
        <div class="span6">
          <div class="inner">
            <img src="images/b-a-pic.png" />
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
  <div class="strip highlight">
    <div class="container">
      <div class="row">
        <div class="span6">
          <div class="inner">
            <center>
              <h2 style="color: #0658a0">The benefits of 
              <span style="color: #000000">Good</span> </br>Clinical
              <span style="color: #000000">Photography</span></h2>
            </center>
            <center>
              <object id="flashObj" width="486" height="412" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0">
                <param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" />
                <param name="bgcolor" value="#FFFFFF" />
                <param name="flashVars" value="videoId=3721169588001&amp;playerID=96360168001&amp;playerKey=AQ~~,AAAAFkZnkSk~,IiQ79d9fntlYzbIBNabTKGnz_-W-KulR&amp;domain=embed&amp;dynamicStreaming=true" />
                <param name="base" value="http://admin.brightcove.com" />
                <param name="seamlesstabbing" value="false" />
                <param name="allowFullScreen" value="true" />
                <param name="swLiveConnect" value="true" />
                <param name="allowScriptAccess" value="always" />
                <embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1" bgcolor="#FFFFFF" flashvars="videoId=3721169588001&amp;playerID=96360168001&amp;playerKey=AQ~~,AAAAFkZnkSk~,IiQ79d9fntlYzbIBNabTKGnz_-W-KulR&amp;domain=embed&amp;dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" allowfullscreen="true" swliveconnect="true" allowscriptaccess="always" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />
              </object>
            </center>
          </div>
        </div>
        <a name="tips"></a>
        <div class="span6">
          <div class="inner">
            <h2 style="color: #0658a0">Photography 
            <span style="color: #000000">tips:</span></h2>
            <ul>
              <li>Make sure you are using a high quality camera with a good lens.</li>
              <li>Mount the camera on a tripod.</li>
              <li>Use the highest resolution possible for your pictures.</li>
              <li>Make sure there are minimal distractions in the background. Shooting on a black background show the best results.</li>
              <li>Isolate the treatment area. When shooting the face, use a headband to hold back hair. Have the patient wear a black drape - light can reflect off of bright colors.</li>
              <li>Put a marker on the wall for patients to look at.</li>
              <li>Always shoot the pictures from the same distance.</li>
              <li>Make sure the lighting is always coming from the same direction.</li>
              <li>Light above the patient will show the most texture - diffuse light with a soft box or with umbrellas.</li>
              <li>Do not set the light up at the same angle as the lens that is shooting the picture.</li>
              <li>Do not use a direct flash.</li>
              <li>Be consistent with the your images. Be aware of :
              <ul>
                <li>Lighting</li>
                <li>Patient position</li>
                <li>Camera</li>
                <li>Camera position</li>
                <li>Patient preparation</li>
                <li style="list-style: none; display: inline">
                  <ul>
                    <li>Clothing</li>
                    <li>Jewelry (preferably none)</li>
                    <li>Make-up (preferably none)</li>
                  </ul>
                </li>
              </ul></li>
              <li>Make sure you are processing the photos in the same way.</li>
            </ul>
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
  <div class="strip highlight strip-alt">
    <div class="container">
      <div class="row">
        <div class="span12">
          <div class="inner">
            <a name="terms"></a>
            <h2 style="color: #0658a0">Terms and Conditions:</h2>
            <ul>
              <li>There is no entry fee and no purchase necessary to enter this competition.</li>
              <li>Route to entry for the competition and details of how to enter can be found at www.COMPANYNAME.com/photocontest.</li>
              <li>Closing date for entry will be March 31st, 2015. After this date the no further entries to the competition will be permitted.</li>
              <li>No responsibility can be accepted for entries not received for any reason.</li>
              <li>There will be four winners, one in each category listed above. The rules of the competition and the prize for each winner are as follows: First Place in each category: $1,000, as well as recognition on the COMPANYNAME website and Facebook page, and ONE of the following: A night out on the town for your office staff, hosted by your sales representative OR chair-massage therapist for a day (not to exceed $1,000) OR $1,000 in COMPANYNAME Top Flight Points. We will compensate entrants $500 for any photo we keep and use.</li>
              <li>COMPANYNAME, Inc. reserves the right to cancel or amend the competition and these terms and conditions without notice in the event of a catastrophe, war, civil or military disturbance, act of God or any actual or anticipated breach of any applicable law or regulation or any other event outside of COMPANYNAME&#39;s control. Any changes to the competition will be notified to entrants as soon as possible.</li>
              <li>COMPANYNAME is not responsible for inaccurate prize details supplied to any entrant by any third party connected with this competition.</li>
              <li>No cash alternative to the prizes will be offered.</li>
              <li>Winners will be chosen by a panel of judges appointed by COMPANYNAME.</li>
              <li>The winner will be notified within 28 days of the closing date. If the winner cannot be contacted or do not claim the prize within 14 days of notification, we reserve the right to withdraw the prize from the winner and pick a replacement winner.</li>
              <li>COMPANYNAME will notify the winner when and where the prize can be collected.</li>
              <li>COMPANYNAME&#39;s decision in respect of all matters to do with the competition will be final and no correspondence will be entered into.</li>
              <li>The winner agrees to the use of his/her name and image in any publicity material.</li>
              <li>Entry into the competition will be deemed as acceptance of these terms and conditions.</li>
            </ul>
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
  <div class="clearfix"></div>
  <div id="footer">
    <div class="clearfix"></div>
  </div>

</html>

最佳答案

看起来 background-size: cover on wrapper 是你的问题。

将其更改为background-size: contain并去掉 body 上的 height:100%

这将解决您的问题。

关于html - wrapper 背景未延伸至封面高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27952939/

相关文章:

html - 如何垂直对齐动态长度的文本,同时让其环绕 float 图像?

php - 使用下拉列表从数据库中删除数据但收到错误消息

html - @media 规则为我的页面添加了额外的空间

javascript - 在 HTML 中分隔 "namespaces"

html - 表格行最后一个单元格的大小错误

php - 选择通过 while 循环生成的单个输出记录,反射(reflect)数据库中表中的信息

html - 使用 'float' 时出现不需要的空格

html - 为什么突出显示列表中的第一个元素?

html - CSS 动画行为

css - 页面溢出到正文右侧