position: fixed doesn't work on iPad and iPhone

后端 未结 15 1926
一整个雨季
一整个雨季 2020-11-22 16:16

I have been struggling with fixed positioning in iPad for a while. I know iScroll and it does not always seem to work (even in their demo). I also know that Sencha has a fix

15条回答
  •  死守一世寂寞
    2020-11-22 16:30

    The simple way to fix this problem just types transform property for your element. and it will be fixed. Happy Coding :-)

    .classname{
      position: fixed;
      transform: translate3d(0,0,0);
    }
    

    Also you can try his way as well this is also work fine.

    .classname{
          position: -webkit-sticky;
        }
    

提交回复
热议问题