Home >Web Front-end >HTML Tutorial >html Style display Property_html/css_WEB-ITnose

html Style display Property_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:52:521113browse

<!DOCTYPE html><html><head><style> #myDIV {    width: 400px;    height: 500px;    background-color: lightblue;}</style></head><body><p>Click the "Try it" button to set the display property of the DIV element to "none":</p><button onclick="myFunction()">Try it</button><div id="myDIV">This is my DIV element.</div><p><b>Note:</b> The element will not take up any space when the display property set to "none".</p><script>function myFunction() {    document.getElementById("myDIV").style.display = "none";}</script></body></html>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn