$location.hash和$anchorScroll()的偏移量
offset for $location.hash and $anchorScroll()
我有根据id
滚动的锚点-如下-
function ($scope, $location, $anchorScroll) {
$scope.gotoBottom = function() {
// set the location.hash to the id of
// the element you wish to scroll to.
$location.hash('bottom');
// call $anchorScroll()
$anchorScroll();
};
(摘自angularjs.org)
由于固定的标头,我必须为此$location.hash('bottom')
设置偏移量(偏移html锚点以调整固定标头的常见问题)。
如何获得补偿?
试试这个
$anchorScroll.y偏移=20;
相关文章:
- 添加新数据时D3.JS条形图列偏移量
- 当偏移量改变时滚动顶部
- 引导数据偏移量底部
- 可以在调整窗口大小时重新调整stellar.js的元素偏移量
- 可滚动元素,如何在调整大小时更改顶部偏移量
- 使用JavaScript日期的任何时间的时区偏移量
- 时刻时区:UTC 偏移量差异
- jQuery偏移量顶部没有'工作不正常
- 如何获取当前时区偏移量(并正确格式化)
- d3.mouse 偏移量返回的值不正确
- jQuery根据鼠标位置计算DIV偏移量和边界
- 更改 for 循环中 SVG 行的笔触虚线偏移量
- 时区偏移量计算
- jquery 如何设置偏移量 () 值
- 在javascript中向本地时间戳添加时间戳偏移量
- jquery ui draggable中的奇怪偏移量
- 如何在发布JavaScript日期对象时保留时区偏移量
- 如何使用javascript获取&使用字符偏移量设置插入符号位置
- Javascript日期(yyyy-mm-ddThh:mm:ss偏移量)未正确转换
- 元素偏移量始终为0