效果没出来

来源:1-1 课程目标和学习内容

慕码人2986628

2017-04-18 11:40

效果没出来

写回答 关注

1回答

  • 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>


全屏切换效果

如何在PC和移动端实现全屏切换效果,本课程会给你答案

85463 学习 · 154 问题

查看课程

相似问题