fullPage全屏高度自适应


<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Auto-height - fullPage.js</title>
    <meta name="author" content="Alvaro Trigo Lopez" />
    <meta name="description" content="fullPage auto-height example." />
    <meta name="keywords"  content="fullpage,jquery,demo,screen,fullscreen,auto-height,full-screen" />
    <meta name="Resource-type" content="Document" />
    <link rel="stylesheet" type="text/css" href="chajian/fullpage.css" />

    <style>
        .myContent{
            height: 300px;
        }
    </style>

</head>
<body>
<div id="fullpage">
    <div class="section section1">
        <div>
            <h1>Section 1</h1>
        </div>
    </div>
    <div class="section fp-auto-height section2" id="section1">
        <div class="myContent">
            <h1>Section 2</h1>
        </div>
    </div>
    <div class="section fp-auto-height fp-tableCell" id="section2">
        <div class="myContent">
            <h1>Section 3</h1>
        </div>
    </div>
</div>

<script type="text/javascript" src="chajian/fullpage.js"></script>

<script type="text/javascript">
    var myFullpage = new fullpage('#fullpage', {
        sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE']

    });

</script>
</body>
</html>

运行如下:

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM