[SOLVED] visibility:hidden vs display:none vs opacity:0


I’m currently starting on an animation project. In the project I’ll have more than 40000 divs and animate them iteratively. If any of divs are in passive state (i.e. it’s not animating at least for 2 seconds), I won’t display them to increase animation performance.

The question is: which css property is the most suitable for this?




And how can I measure rendering performance like fps, gpu usage?


The answer found here will answer your first question (most likely display:none as the space is collapsed completely).

To your second question, tools such as this will probably be useful for you. However 40,000 divs sounds like way too many and you will probably have better performance using canvas or SVG (for example, using the KineticJS library as this handles animations – transformation, rotation, scale, etc.) for you.

Answered By – DF_

Answer Checked By – Timothy Miller (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *