【问题标题】:Iframe position absolute not working in android browseriframe绝对位置在android浏览器中不起作用
【发布时间】:2013-05-23 17:08:43
【问题描述】:

我有一个简单的网页,在 div 容器内有一个 iframe。 使用引导响应式的每件事都可以在下面的代码中正常工作:

  <div id="container">
     <iframe id="iframe2"  name="iframe2"  
     style="position:absolute;top:60px;bottom:0px;height:80%;" width="100%"
         frameborder="0"  src="../dashboard_portal.jsp">
   </iframe>            
  </div>    

以上代码在 chromium、IE、Firefox 中运行良好,没有任何问题。 当我尝试从 android 手机打开页面时.. 这个属性 position:absolute; 导致显示 iframe 时出现问题。

有什么建议吗?

【问题讨论】:

    标签: android iframe twitter-bootstrap css-position android-browser


    【解决方案1】:

    好吧,我想出了一些丑陋的解决方法,任何人都可以提出更好的建议:)

    我已经用position:fixed & z-index:-999Iframe 包裹在div 容器中

     <div id="container" style="position: fixed;top:60px;bottom:0px;height:80%;width: 100%;z-
     index: -999;border: 0" >
          <iframe id="iframe2"  name="iframe2" width="100%" height="100%" style="" 
           frameborder="0" scrolling="no">
          </iframe>         
    </div>  
    

    谢谢。

    【讨论】:

      猜你喜欢
      • 2013-05-01
      • 1970-01-01
      • 2021-10-18
      • 1970-01-01
      • 2013-10-15
      • 2013-12-28
      • 2020-02-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多