/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/amp-story/helloworld.html
84 строки
3 KB
Malte Ubl
🐛Only start the page auto advancement when assets have loaded. (#28725)
09 июн 2020, 05:11
Не верифицирован
09 июн 2020, 05:11
6b73a33
Код
Авторство
О чём код?
<!doctype html> <html amp lang="en"> <head> <meta charset="utf-8"> <script async src="https://cdn.ampproject.org/v0.js"></script> <script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script> <title>My Story</title> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <link rel="canonical" href="helloworld.html"> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <style amp-custom> body { font-family: 'Roboto', sans-serif; } amp-story-page { background: white; } h1 { font-size: 2.875em; font-weight: normal; line-height: 1.174; text-transform: uppercase; } .box { background: rgba(255, 0, 0, 0.3); } .top { position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: green; } .bottom { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; background: blue; } .text { font-size: 1em; } </style> </head> <body> <amp-story standalone> <amp-story-page id="cover" auto-advance-after="5s"> <amp-story-grid-layer template="vertical"> <h1>Hello World</h1> <p>This is the cover page of this story.</p> </amp-story-grid-layer> <amp-story-grid-layer class="box" aspect-ratio="9:16"> <div class="top"></div> <div class="bottom"></div> <div class="text">9:16</div> </amp-story-grid-layer> </amp-story-page> <amp-story-page id="page-1" auto-advance-after="5s"> <amp-story-grid-layer template="vertical"> <h1>First Page</h1> <p>This is the first page of this story.</p> <amp-img src="https://picsum.photos/1600/900?image=110" width="400" height="225"></amp-img> </amp-story-grid-layer> </amp-story-page> <amp-story-page id="page-2"> <amp-story-grid-layer template="vertical"> <h1>Second Page</h1> <p>This is the second page of this story.</p> </amp-story-grid-layer> </amp-story-page> </amp-story> </body> </html>