尝试 iframe 网站的一部分 ( http://edmontontrafficcam.com ),即 map 和视频部分。
我的 Iframe 代码是通过 CSS 自定义的,以包含 map 和视频 Div。但是在加载 iframe 时,视频位于 map 下方并且不可见。我想要网站的精确 View ,其中视频在右侧对齐,没有滚动条。
点击 map ,我失去了对视频的关注,之后我需要重新加载网站以获取 map View 。
<div
style="overflow: hidden; margin: 15px auto; width: 1800px;" >
<iframe src="http://edmontontrafficcam.com/" style="
border: 0px none;
margin-left: 20px;
margin-top: -200px;
margin-right: -900px;
height: 850px;
width: 850px;">
</iframe>
</div>
关于如何保持 div 在网站上看到的对齐有什么建议吗?
最佳答案
在我的 HTMl 中,以下代码给出了我相信您想要的结果。如果我错了,请纠正我。
代码:
<div
style="
overflow: hidden;
margin: 15px auto;
width: 1800px;
">
<iframe src="http://edmontontrafficcam.com/"
style="
border: 0px none;
margin-left: -1000px;
margin-top: -220px;
margin-right: -900px;
height: 900px;
width: 1400px;
">
</iframe>
</div>
关于html - 如何使 iFrame 中的 DIV 对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48640256/