admin管理员组

文章数量:1431387

其他安卓浏览器都没问题,在微信浏览器中会出现这种情况,是因为fixed兼容性问题造成,但是此时absolute并不能满足需求,故使用如下方式解决:

<div>

<div class="content-box"></div>

<div class="nav-bottom"></div>

</div>

.nav-bottom {

  position: fixed;

  bottom: 0;

  left: 0;

  right: 0;

   height: 50px;

}

.content-box {

  /*main绝对定位,进行内部滚动*/

  position: absolute;

  /*top是头部的高度*/

  top: 0px;

  // /*bottom是底部的高度*/

  bottom: 50px;

  /*使之可以滚动*/

  overflow-y: scroll;

  /*增加弹性滚动,解决滚动不流畅的问题*/

  -webkit-overflow-scrolling: touch;

}

本文标签: 器中区域内容网站fixed