/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/experiment.amp.html
79 строк
3 KB
Caroline Liu
Apply lang="en" to examples/ (#34759)
10 июн 2021, 17:30
Не верифицирован
10 июн 2021, 17:30
2ee75c4
Код
Авторство
О чём код?
<!doctype html> <html ⚡ lang="en"> <head> <meta charset="utf-8"> <title>amp-experiment</title> <link rel="canonical" href="amps.html" > <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <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> <script async custom-element="amp-experiment" src="https://cdn.ampproject.org/v0/amp-experiment-0.1.js"></script> <script async custom-element="amp-user-notification" src="https://cdn.ampproject.org/v0/amp-user-notification-0.1.js"></script> <script async src="https://cdn.ampproject.org/v0.js"></script> <style amp-custom> body[amp-x-background-color-test=yellow] { background-color: yellow; } body[amp-x-background-color-test=green] { background-color: green; } body[amp-x-font-color-test=red] { color: red; } body[amp-x-font-color-test=blue] { color: blue; } body[amp-x-border-test=solid] h1 { border: 1px solid black; } body[amp-x-border-test=dashed] h1 { border: 1px dashed black; } amp-user-notification { background-color: darkgray; padding: 5px; } </style> </head> <body> <h1>Background color is user sticky; text color may change on a refresh</h1> <ul> <li><a href="#amp-x-background-color-test=yellow" target="_blank">#amp-x-background-color-test=yellow</a></li> <li><a href="#amp-x-background-color-test=green" target="_blank">#amp-x-background-color-test=green</a></li> </ul> <amp-experiment> <script type="application/json"> { "background-color-test": { "variants": { "yellow": 50, "green": 50 } }, "font-color-test": { "sticky": false, "variants": { "blue": 20, "red": 20 } }, "border-test": { "consentNotificationId": "amp-user-notification", "variants": { "solid": 50, "dashed": 50 } } } </script> </amp-experiment> <amp-pixel src="https://donot.worry/?background-color-test=VARIANT(background-color-test)&font-color-test=VARIANT(font-color-test)&variants=VARIANTS"></amp-pixel> <amp-user-notification layout=nodisplay id="amp-user-notification"> Dismiss this notification to see a border around title on your next visit. <button on="tap:amp-user-notification.dismiss">I accept</button> </amp-user-notification> </body> </html>