分割结束后页脚丢失。
<div id="fullpage">
<div class="section " id="section0"> content1 </div>
<div class="section " id="section0"> content1 </div>
<div class="section " id="section0"> content1 </div>
<div class="section " id="section0"> content1 </div>
</div>
<footer> this is my footer </footer>
这是我的脚本
<script type="text/javascript">
$(document).ready(function() {
$('#fullpage').fullpage({
verticalCentered: false,
resize : true,
easing: 'easeInQuart',
navigation: true,
navigationPosition: 'right',
scrollOverflow: false,
});
});
</script>
我使用整页 js 滚动工作顺利,但页脚不显示。
最佳答案
默认情况下,fullpage 不支持您尝试的这种页脚解决方案。我对原来的fullpage.js做了一个简单的扩展,支持这个。
if (v.anchorLink == 'footer')
{
footer_a = $('#section-footer').height();
footer_h = $('#footer-text').height();
var translate3d = 'translate3d(0px, -' + (v.dtop - footer_a + footer_h) + 'px, 0px)';
}
else
{
var translate3d = 'translate3d(0px, -' + v.dtop + 'px, 0px)';
}
你可以试试:link
页脚高度由其中的文本计算。
关于jquery - 页脚不显示在 div 幻灯片的末尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24424044/