【发布时间】:2021-03-31 13:12:09
【问题描述】:
我正在开发一个网站,在该网站的底部您可以看到它拥有的三个社交媒体帐户,但是使用以下代码,这是输出,但我不知道是什么原因造成的。
如您所见,三个框上方有一个灰色框,我不知道如何解决。
.container {
width: 600px;
height: 190px;
background-color: #ff7675;
padding-top: 20px;
padding-left: 15px;
padding-right: 15px;
}
#st-box {
float: left;
width: 180px;
height: 160px;
background-color: white;
border: solid black;
}
#nd-box {
float: left;
width: 180px;
height: 160px;
background-color: white;
border: solid black;
margin-left: 20px;
}
#rd-box {
float: right;
width: 180px;
height: 160px;
background-color: white;
border: solid black;
}
<div class="container">
<div id="st-box">
<iframe></iframe>
</div>
<div id="nd-box">
<iframe></iframe>
</div>
<div id="rd-box">
<iframe></iframe>
</div>
</div>
我能做什么?
【问题讨论】:
-
如果您检查元素,您可以清楚地看到这些是您的
<iframes>的三个边框。您没有删除边框,也没有为<iframes>设置特定的大小,因此使用了相当大的带边框<iframe>的默认样式。你可以,例如remove the border from these<iframe>s。期望的结果是什么? -
@user4642212 我不太了解你。我应该为 iframe 设置大小吗?