在iFrame的父div上添加邊框半徑時,邊框不能完全適合iFrame,即使它們被分配了相同的寬度和高度值。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;
}
使完美的感覺和偉大的作品。謝謝你,約瑟夫。 – TheDarkIn1978
@TheDark1978不客氣。很高興我能幫上忙。 –