简体   繁体   English

滚动速度操纵CSS jQuery

[英]Scroll speed manipulation css jquery

Find out a website http://www.boy-coy.com/#home . 找出一个网站http://www.boy-coy.com/#home When you scoll down all content scrolls very smooth. 向下滚动时,所有内容滚动都非常流畅。 Even if you scroll it fast, scroll is done at specific speed. 即使快速滚动,仍会以特定速度滚动。 This makes the website faster and responsive. 这使网站更快,响应速度更快。 How this can be achieved with the help of css and jquery? 如何在CSS和JQuery的帮助下实现这一目标?

At first glance. 乍一看。

Try reading their html source code output. 尝试阅读其html源代码输出。

  1. They use a few jquery plugins and legacy browser js plugin calls. 他们使用一些jquery插件和旧版浏览器js插件调用。
  2. They have a custom and partially obfuscated .js script that is in depth, but you can see the specific properties it is setting on items in the page. 他们有一个自定义的且部分混淆的.js脚本,该脚本很深,但是您可以在页面的项目中看到它设置的特定属性。
  3. Barring any terms of use issues, you could likely decipher this pages cool scroll technique by working with this sample code as an example. 除非存在任何使用条款问题,否则您可以通过使用此示例代码作为示例来破译此页面的酷滚动技术。 But it is definitely a fair amount of work to write from scratch or post the entire solution here. 但是,从头开始编写或在此处发布整个解决方案绝对是大量的工作。
  4. Im going to go and look for a smaller example that isnt as involved as this parallax. 我将去寻找一个较小的示例,该示例不涉及此视差。
  5. And check out this link http:// codepen.io/JTParrett/pen/BkDie its got some starting principals here of some of the images positioning at different locations in the viewport when you scroll. 并查看此链接http:// codepen.io/JTParrett/pen/BkDie,在滚动时,它获得了一些放置在视口中不同位置的图像的一些基本原理。
  6. This link in SO can also help Can I change the scroll speed using css or jQuery? SO中的此链接也可以帮助我是否可以使用CSS或jQuery更改滚动速度?
  7. Kirupa has a nice tutorial that can likely help in getting the smoothe scrolling effect stared too. Kirupa有一个很好的教程,它可能也有助于获得平滑滚动效果。 http://www.kirupa.com/html5/smooth_parallax_scrolling.htm http://www.kirupa.com/html5/smooth_parallax_scrolling.htm
  8. And this one is pretty awesome. 而且这个非常棒。 I think I would look into this demo. 我想我会看一下这个演示。 Be sure to test all of click event demos here. 请务必在此处测试所有的点击事件演示。 Im sure you could tie in your jquery tween event for the scroll bar with this http://plugins.compzets.com/animatescroll/ 我确定您可以将此http://plugins.compzets.com/animatescroll/绑定到滚动条的jquery补间事件中
  9. Another decent example http://bassta.bg/demos/smooth-page-scroll/ 另一个不错的示例http://bassta.bg/demos/smooth-page-scroll/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM