amp-next-page
Introduction
amp-next-page
allows you to add an infinite scroll style experience to your AMP pages.
Setup
Import the amp-next-page
component.
<script async custom-element="amp-next-page" src="https://cdn.ampproject.org/v0/amp-next-page-1.0.js"></script>
Basic usage
This sample uses the amp-next-page
component to load other sample pages. It defines a custom separator.
<amp-next-page> <script type="application/json"> [ { "title": "amp-img", "image": "https://preview.amp.dev/static/samples/img/amp.jpg", "url": "/documentation/examples/components/amp-img/" }, { "title": "amp-bind", "image": "https://preview.amp.dev/static/samples/img/amp.jpg", "url": "/documentation/examples/components/amp-bind/" }, { "title": "amp-accordion", "image": "https://preview.amp.dev/static/samples/img/amp.jpg", "url": "/documentation/examples/components/amp-accordion/" }, { "title": "amp-lightbox-gallery", "image": "https://preview.amp.dev/static/samples/img/amp.jpg", "url": "/documentation/examples/components/amp-lightbox-gallery/" }, { "title": "amp-list", "image": "https://preview.amp.dev/static/samples/img/amp.jpg", "url": "/documentation/examples/components/amp-list/" } ] </script> <div class="amp-next-page-sample-separator" separator> amp-next-page separator </div> </amp-next-page>
さらに説明が必要ですか?
このページの説明でご質問のすべてを解消できない場合は、あなたの実際の使用事例について他の AMP ユーザーに問い合わせて話し合ってください。
Stack Overflow にアクセスする 説明されていない機能ですか?AMP プロジェクトでは皆さんの参加と貢献を強くお勧めしています!当社はオープンソースコミュニティに継続的にご参加いただくことを希望しますが、特に熱心に取り組んでいる問題があれば1回限りの貢献でも歓迎します。
GitHub でサンプルを編集する