问答详情
源自:1-1 课程目标和学习内容

效果没出来

效果没出来

提问者:慕码人2986628 2017-04-18 11:40

个回答

  • yclycl
    2017-04-21 10:33:41


    你的代码可能打错了  

    *{padding:0; margin:0;}
    html, body{ height:100%; overflow:hidden;}
    #container,.sections,.section{height:100%;}
    #section0,#section1,#section2,#section3{background-color:#000; background-size:cover; background-position:center; color:#FFF; text-align:center;}
    #section0{ background-image:url(images/1.jpg)}
    #section1{ background-image:url(images/2.jpg)}
    #section2{ background-image:url(images/3.jpg)}
    #section3{ background-image:url(images/4.jpg)}


    <div id="container">
      <div class="sections">
        <div class="section" id="section0"><h3>this is pagefull</h3></div>
        <div class="section" id="section1"><h3>this is pagefull</h3></div>
        <div class="section" id="section2"><h3>this is pagefull</h3></div>
        <div class="section" id="section3"><h3>this is pagefull</h3></div>
      </div>
    </div>