【问题标题】:Google Adsense responsive add not displayed correctlyGoogle Adsense 响应式添加未正确显示
【发布时间】:2015-03-23 21:37:46
【问题描述】:

我的网站上有 Google Adsense 自适应广告。它们应该显示在它们的父容器内,但它们经常溢出它。

一个简单的示例页面,一个带有添加的 DIV:http://adriatic.aventin.hr/_test.php

通常当浏览器(BODY 元素)宽度 > 500 像素时,广告显示是正确的,但当它调整到

我尝试了各种代码更改,但都没有成功。有什么想法吗?

示例页面代码:

<!DOCTYPE HTML>
<html>
<head>
<title>Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<div style="width: 320px; height: 70px; border: 3px solid red">

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-5645119364072707"
     data-ad-slot="9521328853"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>

</body>
</html>

截图:

【问题讨论】:

    标签: html css adsense


    【解决方案1】:

    问题已解决 - 诀窍是不要设置 div 的高度。

    【讨论】:

    猜你喜欢
    • 2016-09-25
    • 2016-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多