CSS hardware accelerated width?

后端 未结 2 1717
栀梦
栀梦 2021-02-09 09:55

I am attempting to build a Phonegap app that will allow the user to change the size of a two column layout by moving the middle divider.

I was able to get this working,

2条回答
  •  别那么骄傲
    2021-02-09 10:30

    I had some success by pushing the two elements into question in the hardware-accelerated stack:

    #leftColumn,
    #rightColumn {
      -webkit-transform: translate3d(0,0,0);
    } 
    

    Seems to be resizing much more smoothly. It's not that changing width itself is optimized, rather the elements themselves are re-rendered much more quickly.

    I set up a plunk here: http://plnkr.co/edit/5RMtCl1Sql8f3CmQLHFz

提交回复
热议问题