<!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>
运行如下: