【发布时间】:2016-01-21 14:20:06
【问题描述】:
我现在正在为我的网站设置 adsense,并尝试在广告后面设置背景图片,这样如果有人访问带有广告屏蔽的页面,就会有一张图片礼貌地要求他们打开它,如果他们想支持网站。目前,我已经将 adsense 代码包装在一个 div 中并在其上设置了背景图像,但是当我这样做时,我的 adblock 软件能够检测到它并阻止它背后的图像。谁能告诉我正确的做法?干杯
HTML -
<div class="ad-alert">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Listings Banner -->
<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-9407013200292589" data-ad-slot="7535806952"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
CSS -
.ad-alert {
width: 728px;
height: 90px;
background-image: url("../images/ad-alert-banner.png");
}
【问题讨论】: