【发布时间】:2014-10-20 21:04:06
【问题描述】:
我正在尝试使用Google Adsense 上的新响应式广告单元将我网站上的静态广告更改为响应式广告
我卡住了,这是我的代码:
HTML:
<div class="g-ad">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive-Forum-Bot -->
<ins class="adsbygoogle g-ad-in"
style="display:inline-block"
data-ad-client="ca-pub-client"
data-ad-slot="adnumber"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
CSS:
@media (min-width:500px){
.g-ad, .g-ad-in{
width:468px
}
.g-ad-in{
height:60px
}
}
@media (min-width:800px){
.g-ad, .g-ad-in{
width:728px
}
.g-ad-in{
height:90px
}
}
我的问题是容器改变了宽度,但它自己的广告没有。 难道我做错了什么?我使用了顶部的指南并按照它..
提前致谢, 丁。
【问题讨论】:
标签: asynchronous responsive-design adsense