为什么fullpage.js中的API配置项resize不起作用呢?
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" /> <title>fullpage2</title> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.2/jquery.fullPage.css" /> <style type="text/css"> .section{ text-align: center; font-size: 30px; color: #fff; } </style> </head> <body> <div id="page"> <div>这是第一屏</div> <div> <div>slide1</div> <div>slide2</div> <div>slide3</div> <div>slide4</div> </div> <div>这是第三屏</div> <div>这是第四屏</div> </div> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.2/jquery.fullPage.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#page').fullpage({ //注意使用的是逗号 sectionsColor: ['blue','grey','red','yellow'], //默认值 controlArrows: true, //默认值 verticalCentered: true, resize: true }); } ) </script> </body> </html>
代码如上,可以复制粘贴,代码已测试,只有resize不起作用。