【问题标题】:Position:fixed; in android it is broken, not working,why?位置:固定;在android它坏了,不工作,为什么?
【发布时间】:2017-07-10 01:34:29
【问题描述】:

在桌面上它可以工作,但在 Android 上就像使用 position: absolute 或什么都没有,或者我不知道。

这是我的代码:

#only_900{
     display: block !important;
    position: fixed;
   bottom: 73px !important;
   z-index: 999;
   width: 100%;
  left: 0;
  --backface-visibility: hidden !important;
  --webkit-transform: translateZ(0);
 }

 #grid1wrap{
    --webkit-backface-visibility: hidden !important;
    --backface-visibility: hidden !important;
    display: block !important;
    position: fixed;
    bottom: 73px !important;
    z-index: 999;
    width: 100%;
    left: 0;
    --webkit-transform: translateZ(0); 
   }

【问题讨论】:

  • 请分享 html 以及尽可能调试的小提琴示例。
  • jsfiddle.net/3f9vnx3z 是的,但它更困难和更先进

标签: android html css


【解决方案1】:

我很确定这个问题是由于各种浏览器解释代码的方式造成的。我认为新的浏览器只会让 html 和里面的内容一样大,因此 HTML 和 body 没有到达底部。尝试添加以下 CSS 代码。

html, 
body {
    height: 100%;
}

【讨论】:

  • 我尝试了这个但没有,在 android div 上占据位置:我认为是绝对的。
  • 我用jquery调用添加和删除类,他可能是问题?
  • 没有运行 jquery 会发生什么?您是否尝试过将其作为内联显示?
  • 是的,试试这个,但没有,总是一样的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-05-05
  • 2022-09-23
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多