最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - skrollr : Horizontal scroll with smooth scrolling not working - Stack Overflow

matteradmin8PV0评论

I am trying to build a site using skrollr. This is the jFiddle link to what I have tried yet. But as you can see it doesn't work as expected when the smoothScrolling is set to true. When setting smoothScrolling = false, things like to work as bit but there are glitches.

skrollr.init({
    forceHeight: true,
    smoothScrolling:true
});
  1. I want to make smoothScrolling = true, but what I am missing here.
  2. Also how can I disable the vertical scroll. Giving overflow:hidden doesn't work, as it will disable skrollr. Also I tried this link, but I couldn't make it to work. The only thing worked is link, but again its only for Webkit browsers. Is there any browser patible solution for this?

Thanks in advance.

I am trying to build a site using skrollr. This is the jFiddle link to what I have tried yet. But as you can see it doesn't work as expected when the smoothScrolling is set to true. When setting smoothScrolling = false, things like to work as bit but there are glitches.

skrollr.init({
    forceHeight: true,
    smoothScrolling:true
});
  1. I want to make smoothScrolling = true, but what I am missing here.
  2. Also how can I disable the vertical scroll. Giving overflow:hidden doesn't work, as it will disable skrollr. Also I tried this link, but I couldn't make it to work. The only thing worked is link, but again its only for Webkit browsers. Is there any browser patible solution for this?

Thanks in advance.

Share Improve this question edited May 23, 2017 at 12:18 CommunityBot 11 silver badge asked Jun 7, 2013 at 4:16 JithinJithin 2,6041 gold badge24 silver badges42 bronze badges 1
  • To set your page to allow overflow in one direction, use overflow-x:visible; overflow-y:hidden; allowing you to create a sidescrolling page. – Thomas Cheney Commented Jan 10, 2014 at 23:04
Add a ment  | 

2 Answers 2

Reset to default 3

You want smooth scrolling for the left movement, but now for top. You need another wrapper element and use data-smooth-scrolling="off" on it.

http://jsfiddle/GpPHx/2/

If you want to hide the scrollbar, skrollr may not be the right choice for what you're trying to do.

Hi Prinzhorn and thanks for the great library. Your jsfiddle solution is perfect for Chrome, however it is still jiggy a bit in Firefox and it is pletely not working for Safari. Can you make a suggestion for those browsers. I really want to implement horizontal scrolling, and I notice on the site of the walking dead it is working fine, however there the code is over-plicated

Post a comment

comment list (0)

  1. No comments so far