GifproGifpro

Image Lazy Loading with IntersectionObserver

CODE PREVIEW

エディタを読み込み中…
P

Prompt

Create a lazy loading image system using IntersectionObserver API. Images should load only when they enter the viewport.

この実装はIntersectionObserver APIを使用して画像を遅延読み込みします。画像はdata-src属性から始まり、ビューポートに入った時のみ読み込まれます(50pxのマージン付き)。読み込み時にフェードインアニメーションで視覚的フィードバックを提供します。

Prompt Overview

This implementation uses the IntersectionObserver API to lazy load images. Images start with a data-src attribute and load only when they enter the viewport (plus 50px margin). A fade-in animation provides visual feedback when images load.

Was this prompt helpful?

Comments

Comments appear after moderation

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Homeヘルプ