手机端上的猫腻真是多啊~~~ 此起彼伏!

最近又遇到了 固定定位的底部导航在ios上被弹出去

ios上position:fixed失效问题

此时内心1w+个草泥马奔过~~~~~~~~

 

直接上解决方案:

<div class="main_comment">```````````````````</div>
<div class="commentBar">回复框</div>
.main_comment{
  width: 100%;
  position: absolute;
  overflow-y: auto;
  top: 0;
  bottom: 0;
  -webkit-overflow-scrolling: touch;   /*这句是为了滑动更顺畅*/
}
.commentBar{
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  background: #fff;
  padding: 5px;
  z-index: 99;
}

 

这里都是用了absolute去解决,达到理想中的效果。

在ios上表现顺畅,在安卓上略显卡顿。不知道是否还有更好的解决办法~

 

 

 

 

 

 

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2021-08-07
  • 2022-01-15
  • 2022-12-23
  • 2018-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2019-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案