最小AMP HTML示例
AMP项目页面将其标识为最低有效页面:最小AMP HTML示例,html,amp-html,Html,Amp Html,AMP项目页面将其标识为最低有效页面: <!doctype html> <html ⚡> <head> <meta charset="utf-8"> <link rel="canonical" href="hello-world.html" > <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<link rel="canonical" href="hello-world.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 src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>Hello World!</body>
</html>
body{-webkit动画:-amp start 8s steps(1,end)0s1 normal tweet;-moz动画:-amp start 8s steps(1,end)0s1 normal tweet;-ms动画:-amp start 8s steps(1,end)0s1 normal tweet}@-webkit关键帧-amp start{从{可见性:隐藏}到{可见性:可见}}@-moz关键帧-amp start{from{可见性:隐藏}
你好,世界!
这看起来很多,尤其是CSS。这真的是最小值吗?是的,这是最简单的AMP页面。
AMP样板文件中提供的CSS是您不能更改的,Malte Ubi解释为一种黑客行为,它会造成即时页面加载的错觉。您可以删除暴雪标志,所以不,事实并非如此。