Performance differences between visibility:hidden and display:none

前端 未结 8 1080
一生所求
一生所求 2020-11-27 04:34

I want to simplify things in my jQuery Backbone.js web application. One such simplification is the behavior of my menu and dialog widgets.

Previously I created the

8条回答
  •  盖世英雄少女心
    2020-11-27 05:06

    display:none; elements are not in the render tree all, so they will perform better at face value.

    I doubt you will have any real visible performance problems from this though. If you need opacity: 0 or visibility: hidden because of their functionality, then just use them. If you don't need the functionality, then use display: none;

提交回复
热议问题