エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
smooth-scroll.js webpack対応 - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
smooth-scroll.js webpack対応 - Qiita
import SmoothScroll from 'smooth-scroll'; // 固定しているheaderの高さを取得 // const headerHeight... import SmoothScroll from 'smooth-scroll'; // 固定しているheaderの高さを取得 // const headerHeight = $('[data-scroll-header]').height(); const headerHeight = document.querySelector('[data-scroll-header]').clientHeight; const options = { selector: '[data-scroll]', // スムーススクロールが有効なリンクに付ける属性 selectorHeader: '[data-scroll-header]', // 固定ナビに付ける属性 // speed: 500, // 到達するまでの総時間(ミリ秒) // easing: 'easeInOutCubic', // スピー