我无法获得fullpage.js垂直对齐我给出的任何内容。首先,我试图在现有代码上实现它,但之后我刚刚重新打开并尝试将其放入以下内容:
<body>
<div id="fullpage">
<div class="section">
<div class="first">
<img src="img/logo.svg" alt="">
</div>
</div>
<div class="section">b</div>
<div class="section">c</div>
<div class="section">d</div>
</div>
<script src="js/jquery.min.js"></script> <!-- Jquery -->
<script src="js/bootstrap.min.js"></script> <!-- bootstrap js -->
<script src="js/jquery.fullPage.js"></script> <!-- Jquery FullPage-->
<script src="js/main.js"></script> <!-- Site Library -->
</body>
我的css依赖很简单:reset.css,bootstrap和animate.css
我感谢任何帮助,提前谢谢
答案 0 :(得分:0)
尝试使用此功能,将粘贴复制到html页面并确保您的js
和css
通话路径正确
<script>
$(document).ready(function() {
$('#fullpage').fullpage({
sectionsColor: ['#999', '#666', '#262626', '#000'],
navigation: true,
verticalCentered: true,
navigationPosition: 'right',
navigationTooltips: ['About', 'Security', 'Industries', ' security', 'footer'],
});
});
</script>
&#13;
body {
float: left;
width: 100%;
padding-bottom: 0px;
}
* {
color:#F00;
text-align:center;
font-size:30px;
}
&#13;
<link rel="stylesheet" href="css/jquery.fullPage.css" >
<div id="fullpage">
<div class="section" id="section0">
<span class="middle">Vertical align</span>
</div>
<div class="section" id="section1">
<span class="middle">b</span>
</div>
<div class="section" id="section2">
<span class="middle">c<span>
</div>
<div class="section" id="section3">
<span class="middle">d</span>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/jquery.fullPage.js"></script>
&#13;