1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
| <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>fullpage-js</title> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css"> <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="fullpage.css" />
</head>
<body style="background: #fc6c7c;text-align: center;"> <div id="fullpage"> <div class="section">Some section</div> <div class="section active">Some section</div> <div class="section"> <div class="slide" data-anchor="slide1"> slide 1 </div> <div class="slide" data-anchor="slide2"> slide 2 <img data-src="static/bg.jpg" style="width: 80%;"></div> <div class="slide" data-anchor="slide3"> slide 3
</div> <div class="slide" data-anchor="slide4"> slide 4 </div> </div> <div class="section">整个视图</div> <div class="section fp-auto-height"><h2>fp-auto-height 自动高度</h2></div> <div class="section fp-auto-height-responsive">fp-auto-height-responsive 全屏,直到响应模式终止。 根据定义调整大小,可能是大于或小于视口</div> </div>
<script type="text/javascript" src="fullpage.js"></script> <script type="text/javascript"> var myFullpage = new fullpage('#fullpage', { anchors:['firstPage', 'secondPage', 'thirdPage','fourthPage', 'fifthPage'], sectionsColor: ['#fc6c7c', '#4BBFC3', '#7BAABE', '#898989', 'green'] }); </script>
<div class="shell"> <div class="shell-header"> <span class="shell-header-actions shell-header-close"></span> <span class="shell-header-actions shell-header-minimize"></span> <span class="shell-header-actions shell-header-maximize"></span> <span class="shell-tabs"> <a href="#html" class="shell-tab active">HTML</a> <a href="#js" class="shell-tab">JS</a> </span> <a href="https://codepen.io/alvarotrigo/pen/qqabrp" class="shell-demo">See in Codepen</a> </div> <div class="shell-body"> <div class="shell-tab-content active" data-tab="html"> <figure class="highlight"> <pre> truetruetrue<code class="language-html" data-lang="html">222</code> truetrue </pre> </figure> </div>
<div class="shell-tab-content" data-tab="js"> <figure class="highlight"> <pre> truetruetrue<code class="language-javascript" data-lang="javascript"> truetruetruetrue<span style="color: #e5e4e4;">111</span> truetruetrue</code> truetrue </pre> </figure> </div> </div> </div> </body>
<script>
$(".shell-tabs a").click(function () { var index = $(".shell-tabs a").index(this); if(0 == index) { $(".shell-tabs").children('a').eq(0).addClass("active"); $(".shell-tabs").children('a').eq(1).removeClass("active"); $(".shell-body").children("div").eq(0).addClass("active"); $(".shell-body").children("div").eq(1).removeClass("active"); } else { $(".shell-tabs").children('a').eq(0).removeClass("active"); $(".shell-tabs").children('a').eq(1).addClass("active"); $(".shell-body").children("div").eq(0).removeClass("active"); $(".shell-body").children("div").eq(1).addClass("active"); } }); </script>
</html>
|