【发布时间】:2018-12-14 22:27:48
【问题描述】:
我有一个 2 列布局,第一个是地图(在 iframe 内),第二个是该地点的信息。
iframe witdh 工作正常,但我无法动态应用高度与第二列文本相同。
有什么想法吗?
MVCE:Fiddle
.column {
float: left;
width: 50%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
<div class="row">
<div class="column">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2516.555272130855!2d4.339358315458401!3d50.894940979539264!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47c3c3ac00000001%3A0x5293071d68a63709!2sAtomium!5e0!3m2!1sca!2ses!4v1530871671353"
width="95%" height="auto"></iframe>
<!-- // tried with px or percentage -->
</iframe>
</div>
<div class="column">
<div> place information </div>
<div> place information </div>
<div> place information </div>
<div> place information </div>
<div> place information </div>
<div> place information </div>
</div>
</div>
【问题讨论】:
标签: html css google-maps iframe