Jquery mobile 找不到宽度为0px且数据广告格式为auto adsense的容器的响应大小
我试图在移动站点中添加adsense响应广告,但收到以下错误:Jquery mobile 找不到宽度为0px且数据广告格式为auto adsense的容器的响应大小,jquery-mobile,responsive-design,adsense,Jquery Mobile,Responsive Design,Adsense,我试图在移动站点中添加adsense响应广告,但收到以下错误: Cannot find a responsive size for a container of width=0px and data-ad-format=auto 该站点是使用JQuery mobile 1.3构建的移动站点。我为横幅div容器设置了一个宽度。我想在ul中添加横幅: <li> <div style="width: 100%">[Banner]</div> </li
Cannot find a responsive size for a container of width=0px and data-ad-format=auto
该站点是使用JQuery mobile 1.3构建的移动站点。我为横幅div
容器设置了一个宽度。我想在ul中添加横幅:
<li>
<div style="width: 100%">[Banner]</div>
</li>
[横幅]
我在另一个视图中添加了类似的横幅,效果非常好。有人有这个问题吗?谢谢
[编辑]如果有人出现此错误,我找到的解决方案是更改adsense广告代码,并手动修改样式,如以下代码:
<style>
.banner { width: 300px; height: 250px; }
@media(min-width: 360px) { .banner { width: 336px; height: 280px; } }
@media(min-width: 500px) { .banner { width: 468px; height: 60px; } }
@media(min-width: 800px) { .banner { width: 728px; height: 90px; } }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- banner -->
<ins class="adsbygoogle banner"
style="display:inline-block"
data-ad-client="xxxx"
data-ad-slot="xxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>'
.横幅{宽度:300px;高度:250px;}
@媒体(最小宽度:360px){.banner{宽度:336px;高度:280px;}
@媒体(最小宽度:500px){.banner{宽度:468px;高度:60px;}
@媒体(最小宽度:800px){.banner{宽度:728px;高度:90px;}
(adsbygoogle=window.adsbygoogle | |[]).push({});
'
谢谢