AMP学习与设置

时间:2019-11-30 13:12:09

标签: html amp-html

我正在学习如何使用AMP制作网页。 通过教程,我注意到控制台浏览器中会弹出此错误 GET https://cdn.ampproject.org/v0.js net::ERR_NAME_NOT_RESOLVED 我以为我可能做错了什么,但是在加载amp.dev网页时会弹出相同的错误。 是否有我缺少或没有安装的东西?

我正在使用文档中的示例代码

<!doctype html>
<html amp lang="en">
 <head>
   <meta charset="utf-8">
   <script async src="https://cdn.ampproject.org/v0.js"></script>
   <title>Hello, AMPs</title>
   <link rel="canonical" href="https://amp.dev/documentation/guides-and-tutorials/start/create/basic_markup/">
   <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
   <script type="application/ld+json">
     {
       "@context": "http://schema.org",
       "@type": "NewsArticle",
       "headline": "Open-source framework for publishing content",
       "datePublished": "2015-10-07T12:02:41Z",
       "image": [
         "logo.jpg"
       ]
     }
   </script>
   <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>
 </head>
 <body>
   <h1>Welcome to the mobile web</h1>
   <amp-img src="bitmap.png" alt="Welcome" height="400" width="800" />
 </body>
</html>

0 个答案:

没有答案
相关问题