This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12010|Reply: 0

[HTML/HTML5] Tips for showing/hiding DIV (difference between visibility and display)

[Copy link]
Posted on 8/7/2015 9:41:34 AM | | |

The visibility of the div can control the display and hiding of the div, but the page is blank when hidden:

style="visibility: none; "

document.getElementById("typediv1").style.visibility="hidden"; Hide

document.getElementById("typediv1").style.visibility="visible"; shown


  By setting the display property, you can free up the page space occupied by hiding the div, as shown below

style="display: none; "

document.getElementById("typediv1").style.display="none"; Hide

document.getElementById("typediv1").style.display=""; Obvious






Previous:After decompiling the .NET file with Reflector, manager, base. AutoScaleMode fix
Next:Benefits: 2 billion red envelopes are free to grab. Real and effective. Tomorrow is predicted to be sold out within 6 minutes
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com