$(window).stellar 是做什么的?

What does $(window).stellar do?

我目前有这段代码(不是我写的):

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

现在,我很好奇它到底做了什么。我确实评论了它,但我没有看到任何变化,但在我毁掉一些东西之前,我想知道它做了什么,这样我就可以决定是否保留它。

也许这有助于为您提供所需的信息^^ http://markdalgleish.com/projects/stellar.js/docs/

您好,它用于视差滚动效果,您也可以参考下面link了解更多信息。

http://markdalgleish.com/projects/stellar.js/docs/

好像是在激活这个插件:

http://markdalgleish.com/projects/stellar.js/

documentation 说明了这些选项的作用:

Configuring Offsets

Stellar.js' most powerful feature is the way it aligns elements.

All elements will return to their original positioning when their offset parent meets the edge of the screen—plus or minus your own optional offset. This allows you to create intricate parallax patterns very easily.

Confused? See how offsets are used on the Stellar.js home page. To modify the offsets for all elements at once, pass in the options:

$.stellar({
  horizontalOffset: 40,
  verticalOffset: 150
});