Why does enabling hardware-acceleration in CSS3 slow down performance?

后端 未结 6 1965
醉梦人生
醉梦人生 2020-11-30 17:23

I am moving 6000 small div elements in an css3 experiment using a transition from top: 0 to top: 145px to test performance.

Using n

6条回答
  •  长情又很酷
    2020-11-30 17:57

    I always add :

    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    

    When working with 3d transform. Even "fake" 3D transforms. Experience tells me that these two lines always improve performances, especially on iPad but also on Chrome.

    I did test on your exemple and, as far as I can tell, it works.

    As for the "why" part of your question... I don't know. 3D transform are a young standard, so implementation is choppy. That's why it's a prefixed property : for beta testing. Someone could fill a bug report or a question and have the team investigate.

    Edit per August 19th 2013:

    There's regular activity on this answer, and I just lost an hour finding that IE10 also need this. So don't forget :

    backface-visibility: hidden;
    perspective: 1000;
    

提交回复
热议问题