【发布时间】:2016-06-14 18:39:35
【问题描述】:
在 iFrame 的父 div 上添加边框半径时,边框不能完全适合 iFrame,即使它们被分配了相同的宽度和高度值。
我在下面的结果图像中添加了指向视觉间隙的箭头。屏幕截图来自最新版本的 Chrome(2016 年 3 月)。
HTML 代码:
<div class="mapFrame">
<iFrame class="googleMap" src="http://maps.google.co.uk/maps?q=sanfrancisco&output=embed" width="500" height="400"></iFrame>
</div>
CSS 代码:
.mapFrame
{
border-style: solid;
border-width: 6px;
border-color: #ffffff;
box-shadow: 0px 0px 20px #000000;
margin: auto;
border-radius: 80px;
overflow: hidden;
width: 500px;
height; 400px;
position: relative;
}
【问题讨论】: