Body / Html没有从div内部获取高度

时间:2018-01-17 19:15:29

标签: html css iframe

我有一个iframe,代码如下:

    <div class="intrinsic-container intrinsic-container-16x9">
     <iframe src="adf.html"></iframe>
    </div>

iframe包含一个页面:

  <body>
   <div id="map-holder">
    <div id="vmap"></div>
    <div id="directions"></div>
    <!--Use this to display data-->
   </div>
  </body>

对于iframe,我有css代码:

    .intrinsic-container {
      position: relative;
      height: 0;
      overflow: hidden;
    }

    /* 16x9 Aspect Ratio */
    .intrinsic-container-16x9 {
      padding-bottom: 56.25%;
    }

    /* 4x3 Aspect Ratio */
    .intrinsic-container-4x3 {
      padding-bottom: 75%;
    }

    .intrinsic-container iframe {
      position: absolute;
      top:0;
      left: 0;
      width: 100%;
      height: 100%;
}

该页面包含:

    #map-holder {
     position: relative;}
    #vmap {
     width: 100%;
     height: 100%;
     position: relative;
     overflow: hidden;
    }
   #directions {
    width: 100%;
    text-align: center;
    font-family: sans-serif;
    font-weight: 100;
    font-family: 'Lora', serif;
    color: #666666;
  }

该页面包含Jquery Vmap插件。问题是,我右边有滚动条。他们来自#directions div。如果我删除这个div,滚动条就会消失。来自#directions的附加高度不会呈现给body和html节点......任何想法?

0 个答案:

没有答案