尝试制作Google展示广告服务的广告,我正在编写脚本,以使横幅动画更具吸引力。测试广告时,我会得到一个空白屏幕,这意味着某处的语法可能有问题。这是我正在修改的代码的一部分,可能弄乱了某些内容(找不到内容)。
<body>
<gwd-google-ad id="gwd-ad" polite-load="">
<gwd-metric-configuration></gwd-metric-configuration>
<gwd-pagedeck class="gwd-page-container" id="pagedeck">
<gwd-page id="page1" class="gwd-page-wrapper gwd-page-size gwd-lightbox" data-gwd-width="300px" data-gwd-height="250px">
<div class="gwd-page-content gwd-page-size">
<gwd-image id="artist_bgnd" source="assets/artist.jpg" scaling="stretch" class="gwd-image-xtys"></gwd-image>
<p class="gwd-p-1fj8" style="letter-spacing: 0.01em;">01.05.2019.</p>
<p class="gwd-p-1kun" style="letter-spacing: 0.01em;">ARTIST NAME</p>
<p class="gwd-p-c7o2" id="datum">Location, address, city</p>
<svg id="logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3500 3500">
<path class="cvjetic" d="M635.18,1230.3a440.38,440.38,0,1,1,171.91-34.72A438.8,438.8,0,0,1,635.18,1230.3Zm0-851.28a408.35,408.35,0,1,0,159.45,32.19A407,407,0,0,0,635.18,379Z"></path>
<path class="cvjetic" d="M636.18,1654a440.31,440.31,0,1,1,171.91-34.71A439,439,0,0,1,636.18,1654Zm0-851.28a408.3,408.3,0,1,0,159.45,32.19A407,407,0,0,0,636.18,802.69Z"></path>
<path class="cvjetic" d="M1373.62,1224.33a440.27,440.27,0,1,1,171.91-34.71A438.72,438.72,0,0,1,1373.62,1224.33Zm0-851.27a408.29,408.29,0,1,0,159.44,32.18A407,407,0,0,0,1373.62,373.06Z"></path>
<path class="cvjetic" d="M1373.62,1655.94a440.33,440.33,0,1,1,171.91-34.72A438.73,438.73,0,0,1,1373.62,1655.94Zm0-851.28a408.29,408.29,0,1,0,159.44,32.18A407.18,407.18,0,0,0,1373.62,804.66Z"></path>
<path class="cvjetic" d="M1001.76,1013.28a440.31,440.31,0,1,1,171.91-34.71A439,439,0,0,1,1001.76,1013.28Zm0-851.28a408.35,408.35,0,1,0,159.45,32.19A407,407,0,0,0,1001.76,162Z"></path>
<path class="cvjetic" d="M1001,1441.64a440.31,440.31,0,1,1,171.91-34.71A439,439,0,0,1,1001,1441.64Zm0-851.28a408.35,408.35,0,1,0,159.45,32.19A407,407,0,0,0,1001,590.36Z"></path>
<path class="cvjetic" d="M1005.55,1870.09a440.31,440.31,0,1,1,171.91-34.71A439,439,0,0,1,1005.55,1870.09Zm0-851.27A408.24,408.24,0,1,0,1165,1051,406.95,406.95,0,0,0,1005.55,1018.82Z"></path>
</svg>
</div>
</gwd-page>
</gwd-pagedeck>
</gwd-google-ad>
<script type="text/javascript" id="gwd-init-code">
var logo = document.getElementById("logo");
tl = new TimelineMax({
paused: true,
repeat: 2,
repeatDelay: 5
});
tl.from(logo, 2.5, {
transformOrigin: "50% 50%",
delay: 1,
scale: 1,
opacity: 1,
ease: Power3.easeOut
}, 0.1);
}
(function() {
var gwdAd = document.getElementById('gwd-ad');
/**
* Handles the DOMContentLoaded event. The DOMContentLoaded event is
* fired when the document has been completely loaded and parsed.
*/
function handleDomContentLoaded(event) {
/**
* Handles the WebComponentsReady event. This event is fired when all
* custom elements have been registered and upgraded.
*/
function handleWebComponentsReady(event) {
// Start the Ad lifecycle.
setTimeout(function() {
gwdAd.initAd();
}, 0);
}
/**
* Handles the event that is dispatched after the Ad has been
* initialized and before the default page of the Ad is shown.
*/
function handleAdInitialized(event) {
tl.play();
}
window.addEventListener('DOMContentLoaded',
handleDomContentLoaded, false);
window.addEventListener('WebComponentsReady',
handleWebComponentsReady, false);
window.addEventListener('adinitialized',
handleAdInitialized, false);
})();
</script>
</body>