禁用视差上的水平滚动 [英] Disable horizontal scroll on parallax

查看:88
本文介绍了禁用视差上的水平滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用滑块和stellarjs进行了站点视差滚动. 这在上下滚动时效果很好,但也可以水平滚动,我不想要.

I made a site parallax scrolling, using slider and stellarjs. This works well for scrolling up and down, but it also scrolls horizontally and I do not want.

所以我想禁用水平滚动,并将宽度保持在用户屏幕的100%或特定宽度.

So i want to disable horizontally scrolling and keep my width at 100% of user screen or at a specific width.

这是网站:ecolopeintre.com/index_para.php

here's the website : ecolopeintre.com/index_para.php

推荐答案

Stellar提供了选项,请查看文档

Stellar offers options, please review docs http://markdalgleish.com/projects/stellar.js/docs/

要关闭水平滚动,请查看下面的代码,希望它可以对您有所帮助.

In order to turn off horizontal scrolling please review the code below hopefully it can help.

$.stellar({
  horizontalScrolling: false,
});

这篇关于禁用视差上的水平滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆