- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 58字
- 2021-07-08 10:04:09
Fallbacks
The fallback attribute is used to indicate that an element should be used instead of a parent element when the parent is not supported. We'll be covering the amp-video component in more detail later, but as an example, you could add a fallback message for browsers that don't support HTML5 video like this:
<amp-video width=640 height=380 src="cats.mp4">
<div fallback>
<p>HTML5 video not supported</p>
</div>
</amp-video>