[英]Google Ad unit floating on top left of the page
如下所示將 Google AdSense 廣告單元放置在我的ssadic.com網站中后,廣告單元處於浮動狀態並顯示在頁面的左上角而不是所需的 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 區域內?
附上問題的屏幕截圖:廣告單元浮動在左上角而不是內部
使用position: fixed
和top 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
bottom: 0; right: 0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.