【问题标题】:asp.net mvc AMP project don't workasp.net mvc AMP 项目不起作用
【发布时间】:2017-09-12 01:00:07
【问题描述】:

我的页面代码:

    @{ 
    Layout = null;
}
<!doctype html>
<html amp lang="en">
<head>
    <meta charset="utf-8">
    <title>Hello, AMPs</title>
    <link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
    <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>
    <script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
    <h1>Welcome to the mobile web</h1>
</body>
</html>

我从 AMP 项目网站复制并粘贴,但为什么不起作用? 我得到 “标签 'noscript > style[amp-boilerplate]' 中的强制文本 (CDATA) 丢失或不正确。” 错误。 我的 amp 页面网址:http://www.saharezervasyon.com/amp#development=1 带有开发查询。

【问题讨论】:

    标签: asp.net amp-html


    【解决方案1】:

    这部分的变化

    <style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style>
    

    正文后无空格

    更多详情please visit this link

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-14
      • 1970-01-01
      • 1970-01-01
      • 2018-07-28
      • 2019-05-12
      • 1970-01-01
      • 2011-06-13
      • 2019-07-03
      相关资源
      最近更新 更多