【发布时间】:2012-05-02 07:38:29
【问题描述】:
我在使用height="100%" 和width="100%" 的页面上有一个全角谷歌地图。我想知道把一些css div 的东西放在上面。我读到使用诸如margin-top: -500px; 之类的负值会起作用,而且它们会起作用,但是当我尝试为 div 的背景分配颜色时,它不会在地图上显示它,而是在它下面显示它,这根本不是我想要的。这个问题有方法解决吗?
代码:
<iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&ie=UTF8&ll=37.0625,-95.677068&spn=56.506174,79.013672&t=m&z=4&output=embed"></iframe>
<div class="content"> I want this text to be in a div box that has a black background. <br /> </div>
风格:
.content {
margin-top: -500px;
width: 390px;
background-color: black;
}
【问题讨论】: