[英]Css spacing issue with iFrame
在一行中,我有一個iframe谷歌地圖,下一行是一個地址,但是iframe注入了一塊空白,並將該地址推到了頁面限制之外,請參見圖片;
Codepen范例https://codepen.io/grabthereef/pen/PJOYaa
HTML;
<section id="map-section">
<div class="row">
<div class="col-9">
<div class="google-map">
<iframe src=""
height="200" width="100%"
frameborder="0" style="border:0"
allowfullscreen></iframe>
</div>
</div>
<div class="bg-warning col-3">
<div class="home-address">
<p class="address">
Address 1
Address 2<br>
33-655<br>
</p>
</div>
</div>
</div>
</section>
CSS;
#map-section {
.google-map{
float: left;
width: 100%;
}
.address{
font: 2em "Caveat";
text-align: center;
text-shadow: 1px 1px 0 rgba(0,0,0,.3);
padding-top: 2.5em;
padding-left: 0em;
}
}
我通過添加'overflow-x:hidden;'解決了這個問題 所以;
html,body {
margin: 0px;
padding: 0px;
overflow-x: hidden;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.