【问题标题】:Google Ad unit floating on top left of the page浮动在页面左上角的 Google 广告单元
【发布时间】:2021-12-06 00:43:28
【问题描述】:

在我的网站ssadic.com 中放置 Google AdSense 广告单元后,广告单元会浮动并显示在页面的左上角,而不是在所需的 div 内。

        <div class="card">
            <div class="card-header">광고</div>
            <div class="card-body" style="padding:5px !important">
                
                 <!--- Google Ad Unit --->

            </div>
        </div>

问题仅显示在桌面(非移动设备)和 Chrome(非 Safari)上 有没有办法强制广告定位在 div 区域内?

附上问题截图:ad unit floating on top left instead of within

【问题讨论】:

    标签: javascript google-chrome adsense


    【解决方案1】:

    使用position: fixedtop left

    引导

    <div class="position-fixed top-0 start-0">
        <div class="card">
            <div class="card-header">광고</div>
                <div class="card-body" style="padding:5px !important">
                    
                    <!--- Google Ad Unit --->
    
                </div>
        </div>
    </div>
    

    只有 Css

    .card {
        position: fixed;
        top: 0;
        left: 0;
    }
    

    你也可以设置bottom: 0; right: 0

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-30
      • 1970-01-01
      • 2016-07-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多