【发布时间】:2021-04-21 13:31:09
【问题描述】:
这是我的代码。
<div class="pagecontent" id="fullpage" >
<div class="fullscreensection section">
</div>
<div class="fullscreensection section">
</div>
<div class="fullscreensection section">
</div>
<div class="fullscreensection section">
<div class="versepicture-center" style="background-image:linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0)),url(/docs/thumbnails/Meditate-Morning-7.jpg);"></div>
<p class="meditate-verse">But I will sing of your strength; I will sing aloud of your steadfast love in the morning. For you have been to me a fortress and a refuge in the day of <span class="nobreak">my distress. </span></p>
<p class="meditate-ref">Psalm 59:16</p>
</div>
</div>
如您所见,我在这里使用的是完整页面。我希望“部分” div 在移动设备上水平滚动。 这是我尝试过的,但它不起作用。
1。 让选项 = { 垂直居中:真, // 水平滚动:true, normalScrollElements: '.section', } new fullpage('#fullpage', options);
当我使用它时,它甚至会在垂直方向停止工作(使用 fullpagejs 的主要目的)。
2。 fullpage_api.setAllowScrolling(true, 'right');
【问题讨论】:
标签: javascript html horizontal-scrolling fullpage.js