刚用Adobe动画CC创建了我的第一个AMPHTML广告。
我试着用https://h5validator.appspot.com/验证这个广告
我的广告没有通过高级HTML5检查。我收到以下错误消息:
您的HTML5资产之一无效,无法进行分析。请纠正任何格式错误的资产,然后再试一次。更多细节: SVG_INVALID
这是广告的源代码。在座的人会想到什么会有问题吗?
<!doctype html>
<html amp4ads>
<head>
<!-- export v1.0.36-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<style amp4ads-boilerplate>body{visibility:hidden}</style>
<style amp-custom> img {position: absolute;} body {background-color: rgba(255,255,255,1.0000);}
svg {width: 300px; height: 300px; position: absolute;} .hideForPreload { visibility: hidden; } </style>
<script async src="https://cdn.ampproject.org/amp4ads-v0.js"></script>
<script async custom-element="amp-animation" src="https://cdn.ampproject.org/v0/amp-animation-0.1.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
</head>
<body >
<amp-analytics type="googleanalytics" id="pageView">
<script type="application/json">
{
"vars": {
"account": "No ID found."
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
}
}
}
</script></amp-analytics>
<div id="svgWrapper" class="hideForPreload" >
<svg style="width: 0; height: 0;">
<defs>
<g vector-effect="none" id="l0" >
<g vector-effect="inherit" id="l0o0" style="transform: matrix(1.0000,0.0000,0.0000,1.0000,0.0000,0.0000); opacity: 1.0000; visibility: inherit;">
<path vector-effect="inherit" fill="rgba(0,0,204,1.000)" stroke="none" d="M 300.0000 0.0000 L 0.0000 0.0000 L 0.0000 300.0000 L 300.0000 300.0000 L 300.0000 0.0000 "></path>
</g>
</g>
</defs>
</svg> <svg><use id="o0" xlink:href="#l0" ></use></svg>
</div>
<amp-animation layout="nodisplay" trigger="visibility">
<script type="application/json">
{"animations":[
{
"selector": "#svgWrapper",
"duration":"1s",
"iterations":1,
"fill":"both",
"keyframes": [
{
"offset" : 0,
"visibility" : "inherit",
"easing" : "step-start"
},{
"offset" : 1,
"visibility" : "inherit",
"easing" : "step-end"
}
]
},
{
"selector" : "#o0",
"duration" : "2s",
"iterations" : "infinity",
"fill" : "both",
"keyframes" : [
{
"offset" : 0,
"transform" : "matrix(1.0000,0.0000,0.0000,1.0000,0.0000,0.0000)",
"opacity" : 1,
"visibility" : "inherit",
"easing" : "cubic-bezier(0.3333, 0.3333, 0.6667, 0.6667)"
},
{
"offset" : 1,
"transform" : "matrix(1.0000,0.0000,0.0000,1.0000,0.0000,0.0000)",
"opacity" : 1,
"visibility" : "inherit",
"easing" : "step-end"
}
]
}
]}
</script>
</amp-animation>
</body>
</html>
发布于 2020-03-11 19:24:37
发布于 2020-04-21 12:55:28
根据无效/?选项卡=注释#注释-98301,您的svg标记(请注意,可能有两个'svg‘标记实例)缺少一个正确的配置文件描述:
<svg baseProfile="full" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
我在使用动画(v.19) + AMP4ADS导出横幅后遇到的另一个错误是“CLICK_TAG_MISSING”。这一问题可通过以下方式加以解决:
<script type="text/javascript">
var clickTag = "https://www.nasa.gov";
</script>
https://stackoverflow.com/questions/60320557
复制相似问题