anchor-offset
Offset scroll position for page anchors.
Useful for websites that have fixed content at the top of the page, such as a navigation bar.
Usage
anchorOffset(offset)
Argument | Default | Description |
---|---|---|
offset | 0 |
The amount to offset in pixels. |
Node
Install the package with npm.
npm install --save anchor-offset
Import the anchor-offset module.
; ;
Web
Get the latest release and include it in your page.