当此框没有广告可用时,如何隐藏 adsense iframe/div?
最佳答案
Google 官方推荐使用 CSS。
Google 使用 data-ad-status 来指示广告展示位置是否已填充,可以有针对性地应用 CSS 来隐藏该元素。
ins.adsbygoogle[data-ad-status="unfilled"] {
display: none !important;
}
来自谷歌的支持文章:https://support.google.com/adsense/answer/10762946?hl=en
关于jquery - 如何隐藏空的 adsense 框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3529040/