Anchor

1ページ内でスクロールするためのハイパーリンク。

いつ使うか

  • ページ上のアンカーハイパーリンクを表示し、それらの間をジャンプするため。

基本

最も単純な使用法。

静的アンカー

ページがスクロールしても状態を変更しません。

水平アンカー

水平に配置されたアンカー。

API リファレンス

Anchor

プロパティ
説明
タイプ
デフォルト

affix

Fixed mode of Anchor boolean true

bounds

Bounding distance of anchor area, unit: px number 5

offsetTop

Pixels to offset from top when calculating position of scroll number 0

targetOffset

Anchor scroll offset, default as offsetTop number -

container

Scrolling container selector string 'window'

direction

Set Anchor direction 'vertical' | 'horizontal' 'vertical'
プロパティ
説明
タイプ
デフォルト

href

target of hyperlink string -

title

content of hyperlink string -

target

Specifies where to display the linked URL string -