AMP

AMP 组件目录

AMP HTML 库包含一个基本运行时,可将 AMP 的核心功能带到您的页面。如果您想添加其他功能,可以使用一个或多个即用型 AMP 组件。它们被分类为

内置 包含在基本库中的组件,例如 amp-imgamp-pixel
扩展 必须作为自定义元素显式包含在文档中的基本库的扩展。
实验性 已发布但尚未准备好广泛使用的组件。

重点组件

按类别筛选

动态内容

amp-consent
Provides the ability to collect and store a user's consent through...
amp-form
Allows you to create forms to submit input fields in an AMP document.
amp-geo
Provides an approximate country-level geolocation interface.
amp-gist
Creates an iframe and displays a GitHub Gist.
amp-img
Replaces the HTML5 img tag.
amp-install-serviceworker
Installs a ServiceWorker for the current page.
amp-layout
A generic, multi-purpose container element that brings AMP's...
amp-list
Dynamically downloads data and creates list items using a template.
amp-live-list
Provides a way to display and update content live.
amp-pixel
A tracking pixel to count page views.
amp-story-interactive
A rich set of interactive experiences for stories, including...

媒体

amp-audio
Replaces the HTML5 audio tag.
amp-story-360
Embeds 360 images and videos, explorable by gyroscope or...
amp-story-panning-media
Transition an image's position and zoom between pages.
amp-video
Replaces the HTML5 video tag.

演示

amp-fit-text
扩大或缩小字体大小,以使内容适合给定的空间。
amp-font
触发和监控 AMP 页面上自定义字体的加载。
amp-story-animation
用于在 amp-story 中配置自定义动画的组件。
amp-story-audio-sticker
用户点击以取消故事静音的贴纸。
amp-story-auto-ads
将广告动态插入到故事中。
amp-story-captions
自定义视频字幕渲染。
amp-story-cta-layer
AMP 故事单页的单层,允许...
amp-story-grid-layer
AMP 故事单页的单层,用于定位其...
amp-story-page-outlink
用于在 AMP 故事页面中一键打开外部链接的 CTA 按钮。
amp-story-page
AMP 故事的单个屏幕。
amp-story-player
用于在您的...中嵌入和播放您最喜欢的故事的播放器。
amp-story-shopping
AMP 故事页面中可配置的、模板化的购物体验。
amp-story-subscriptions
AMP 故事页面中可配置的、模板化的订阅体验。
amp-story
一种丰富的视觉故事讲述格式。