0

I will be toggling show & hide for several absolutely positioned elements.

Yes, I know display takes the element out of the layout and visibility & opacity leave the element inside the layout.

Further, my elements will be absolutely positioned and therefore will be out of the layout for either display or visibility.

I'm wondering about performance considerations -- not layout considerations

Are there realistic performance considerations when doing show/hide with display:none versus visibility:hidden?

JustAsking
  • 157
  • 1
  • 10
  • 1
    _Several_ elements? It makes no difference whatsoever. You're far under the threshold of diminishing returns for your effort. Several _thousand_ elements? Then it matters. – isherwood Aug 31 '23 at 19:13
  • @isherwood, thanks, that answers the root of my question. Since I only have max 3-4 dozen elements I'll not worry and use display:none; If you post your comment as a question I'll mark it as my answer. – JustAsking Sep 03 '23 at 03:13

0 Answers0