display:none
means that the element isn't rendered as part of the DOM, so it's not loaded until the display property changes to something else.
visibility:hidden
loads the element, but does not show it.
Why does jQuery use display:none
for its show/hide functions instead of switching between visibility:hidden
and visibility:visible
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…