ざっくりとした質問で申し訳ないのですが、
スマホ(iPhoneXで確認、iOS最新)ページトップでのスクロール中や、モーダルウィンドウを閉じるときに背景固定を解除するときにコンテンツの画像やらテキストまでも描画が一瞬消えてしまいます。
こうなる原因が掴めないので、なにか心当たりありますでしょうか?
(※通常状態での表示は問題なく表示されてます。)
[補足(自分的に気になっている点)]
・ページトップの実装は、"Sweet-Scroll.js"というプラグインを使っています。(smoothScrollでも同様のことが発生)
・svg, backgroundでグラデーションを使っている箇所が多い。
・img要素ではなくbackground-image指定で画像を表示させている箇所が多い。
・ちなみにモーダルの背景固定はこんな感じでやっています。
class ContentScrollToggle { constructor() { this.currentScrollY = 0; this.container = document.body; } lock() { this.currentScrollY = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; this.container.style.position = 'fixed'; this.container.style.width = '100%'; this.container.style.top = `${-this.currentScrollY}px`; } release() { this.container.removeAttribute('style'); this.container.scrollTop = this.currentScrollY; } }
あなたの回答
tips
プレビュー