<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>123</title>
<link rel="stylesheet" type="text/css" href="css/jquery.fullPage.css">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>
<div>
<ul>
<li data-menuanchor="page1" class="active"><a href="#page1">section1</a></li>
<li data-menuanchor="page2"><a href="#page2">section2</a></li>
<li data-menuanchor="page3"><a href="#page3">section3</a></li>
<li data-menuanchor="page4"><a href="#page4">section4</a></li>
</ul>
</div>
<div id="fullPage">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.fullPage.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>$(document).ready(function(){
$("#fullPage").fullpage({
sectionsColor:["blue","yellow","green","orange"],
verticalCentered:false,
anchors:["page1","page2","page3","page4"],
//loopBottom:true,
fixedElements:".topMenu",
continuousVertical:true,
menu:".topMenu",
navigation:true,
navigationPosition:"left",
navigationTooltips:["1","2","3","4"],
showActiveTooltip:true,
//scrollOverflow:true,
})
})
6 回答
牧野Peikon
TA贡献1条经验 获得超0个赞
不知道有没有特殊的设置,不过可以曲线救国:
在回调函数afterRender里(页面初始化完成后)手动调用moveTo(section, slide)来移动到第一屏
添加回答
举报
0/150
提交
取消