display: none
doesn’t have a literal opposite like visibility:hidden
does.
The visibility
property decides whether an element is visible or not. It therefore has two states (visible
and hidden
), which are opposite to each other.
The display
property, however, decides what layout rules an element will follow. There are several different kinds of rules for how elements will lay themselves out in CSS, so there are several different values (block
, inline
, inline-block
etc — see the documentation for these values here ).
display:none
removes an element from the page layout entirely, as if it wasn’t there.
All other values for display
cause the element to be a part of the page, so in a sense they’re all opposite to display:none
.
But there isn’t one value that’s the direct converse of display:none
– just like there’s no one hair style that’s the opposite of “bald”.