【发布时间】:2017-02-01 10:51:38
【问题描述】:
我需要按照Create Your First AMP Page 上的指南在(Spring MVC + thymeleaf)网站中的特定页面上使用 AMP 技术
验证器显示许多错误:
属性“xmlns”可能不会出现在顶级标签“html ⚡”中
标签“head > style[amp-boilerplate] - old variant”已弃用 - 请改用“head > style[amp-boilerplate]”。
标签“head > style[amp-boilerplate] old variant”中的强制文本 (CDATA) 缺失或不正确。
代码:
<!doctype html>
<html amp xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" lang="ar">
<head>
<title>Some title</title>
<meta charset="utf-8" />
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="canonical" content="some-url-here" />
<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>
<script async="" src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
content is here
</body>
</html>
知道如何解决这个问题吗?
【问题讨论】:
-
是输出上面的代码吗?如果有,能否提供你的源代码。
标签: html spring-mvc thymeleaf amp-html