Dan*_*tar 16 angularjs anchor-scroll
我$anchorScroll在AngularJS中使用-service.它工作正常.但是我在顶部有一个固定的导航栏,滚动位置总是x像素到远.
现在在$anchorScroll文档中有一个名为的属性yOffset.根据文档,它应该解决我的问题.
我不知道如何使用这个yOffset属性,因为这个特定的部分没有例子.
我如何使用-service 的yOffset-property $anchorScroll?
mer*_*lin 29
有一个示例说明了如何yOffset在$anchorScroll文档的底部使用.
// offset position by 100px down from the top
$anchorScroll.yOffset = 100;
Run Code Online (Sandbox Code Playgroud)
这是示例的plunker
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           18960 次  |  
        
|   最近记录:  |