anchorScroll在AngularJS的yOffset财产

anchorScroll在AngularJS的yOffset财产

本文介绍了如何安装和使用$ anchorScroll在AngularJS的yOffset财产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用AngularJS的 $ anchorScroll - 服务。它工作正常。但我有在顶部固定的导航栏和滚动位置的推移始终的X像素为止。

I use the $anchorScroll-service in AngularJS. It works fine. But I have a fixed navigation bar at the top and the scrolling location goes always x-pixels to far.

现在在。

There is an example that illustrates how to use yOffset at the bottom of the $anchorScroll documentation.

// offset position by 100px down from the top
$anchorScroll.yOffset = 100;

这是例子

这篇关于如何安装和使用$ anchorScroll在AngularJS的yOffset财产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 20:44