Home  >  Q&A  >  body text

javascript - About the automatic height invalidation problem of fullpage.js


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Auto-height sections size - fullPage.js</title>
    <link rel="stylesheet" type="text/css" href="./css/jquery.fullPage.css" />
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>

    <script type="text/javascript" src="./js/jquery.fullPage.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
          $('#fullpage').fullpage({
              anchors: ['page1', 'page2', 'page3', 'page4'],
              sectionsColor: ['yellow', 'orange', '#C0C0C0', '#ADD8E6'],
            });
        });
    </script>

    <style>
.section {
  text-align:center;
  font-size: 3em;
}
.content{
  margin:50px
}
    </style>
</head>
<body>
<p id="fullpage">
    <p class="section">One</p>
    <p class="section">Two</p>
    <p class="section fp-auto-height">
      <p class="content">Three</p>
    </p>
    <p class="section fp-auto-height">
      <p class="content">Four</p>
  </p>
</p>

</body>
</html>

This is my code. Fullpage.js and fullpage.css are both downloaded from the GitHub address of fullpagejs;

I copied a copy of the demo code address provided by GitHub, but the effect on the demo did not appear<It seems that fp-auto-height did not take effect>

Please give me some advice, please give me some advice

滿天的星座滿天的星座2642 days ago709

reply all(1)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-06-30 09:57:48

    css, js, and html are all copied from the official demo. The referenced fullpage.js and fullpage.css are also downloaded from GitHub. Why does the effect of the official demo not appear?

    reply
    0
  • Cancelreply