我正试着在我的网站上的Google adsense广告下面放一张图片,但我不能让它工作。可能是我的CSS很烂,但我想知道是否有人知道如何在它下面放一张图片。我这样做,所以如果有人有广告拦截器将有图片,而不是说广告支持我们,请禁用您的广告拦截器。这是我的测试广告的代码。
<script type="text/javascript"><!--
google_ad_client = "ca-pub-9190588463236669";
/* herp */
google_ad_slot = "8389049989";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
发布于 2013-04-21 08:20:55
我猜你的意思是隐藏在谷歌AdSense区块下面,这样用户只在没有AdSense广告允许运行的情况下才能看到它?
我想不出任何使用HTML和CSS的方法。相反,您可以尝试使用noscript元素来告诉您的网页在AdSense JavaScript块由于脚本被禁用而无法执行时如何呈现。
例如:
<script type="text/javascript">
<!-- AdSense code goes here as normal -->
</script>
<noscript>
<img src="images/ads-support-this-site.jpg" width="750" height="75" alt="Ads support this site. Please do not use plugins to disable ads." />
</noscript>
这将允许您在脚本块未运行时显示所选的JPEG图像(和/或其他HTML标记)。
有关更多详细信息,请参阅HTML5 noscript element definition on the W3 site。
我已经很久没有阅读谷歌AdSense的条款和条件了,而且谷歌一直对代码的修改都很挑剔。因此,你可能想联系谷歌,检查他们的条款和条件是否允许使用noscript模块,以避免惹恼他们并被踢出程序。
https://stackoverflow.com/questions/15982299
复制相似问题