The opposite of visibility: hidden
is visibility: visible
. Similarly, is there any opposite for display: none
?
Many people be
display:unset sets it back to some initial setting, not to the previous "display" values
i just copied the previous display value (in my case display: flex;) again(after display non), and it overtried the display:none successfuly
(i used display:none for hiding elements for mobile and small screens)
You can use display: block
Example :
<!DOCTYPE html>
<html>
<body>
<p id="demo">Lorem Ipsum</p>
<button type="button"
onclick="document.getElementById('demo').style.display='none'">Click Me!</button>
<button type="button"
onclick="document.getElementById('demo').style.display='block'">Click Me!</button>
</body>
</html>
The best answer for display: none
is
display:inline
or
display:normal