您现在的位置是: 首页 >  技术分享 > 

ios position = fixed 滑动防抖
传说中的小明 2023-10-18 18:01:06

页面布局  如下:
<header></header>
<div></div>
<footer></footer>


样式如下:

header {

        position: fixed;

        top: 0;

}

div {

        position: absolute;

        width: 100%;

        left: 0;

        right: 0;

        top: 0;

        bottom: 0;

        overflow-y: scroll;

        -webkit-overflow-scrolling: touch;

        /* 解决ios滑动不流畅问题 */

}

.footer {

        position: fixed;

        bottom: 0;

}


Copyright © 2021
www.yunyakeji.cn All rights reserved. 小明博客 豫ICP备2020029140号-1