gpt4 book ai didi

google-chrome - 如何在没有 amp-ad 的情况下呈现 Amp 广告?

转载 作者:行者123 更新时间:2023-12-04 16:15:58 28 4
gpt4 key购买 nike

尝试实现 amp-ad 在 amp 页面中呈现视频广告,但面临以下问题。

<div class='ad-banner' id="div-gpt-ad-xxxxxxxxx-1">
<amp-ad layout=fluid height=fluid type="doubleclick" data-slot="/12431234343/Qa/Android_Mobile_Web/Home" json="{&quot;targeting&quot;:{&quot;NativeType&quot;:&quot;videoad&quot;}}">
</amp-ad>

在广告响应中,我们可以看到正确的响应,但在元素中我们可以看到 height=0 或隐藏的 attrb 已添加为 amp-ad 元素的一部分。因此呈现的广告在前端是不可见的。

那么无论如何要在没有 amp-ads 的情况下呈现广告,或者上面的广告是可解决的。

最佳答案

fluid的布局类型根据 amp-ad 无效component specifications , 您需要 fill , fixed , fixed-height , flex-item , intrinsic , nodisplay , 或 responsive .您还需要定义一个 heightwidth amp-ad 元素上的广告值取决于所选的布局类型。

来自 amp-ad 文档:

The <amp-ad> requires width and height values to be specified according to the rule of its layout type. It requires a type argument that select what ad network is displayed.



这些问题的组合很可能导致广告隐藏。

关于google-chrome - 如何在没有 amp-ad 的情况下呈现 Amp 广告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53041341/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com