In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to hide the navigation tags of html5". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In html5, you can use the hidden attribute to hide the navigation tag, which specifies that the specified element is hidden, which is a new attribute in html5 with a syntax of ".".
The operating environment of this tutorial: windows10 system, HTML5 version, Dell G3 computer.
How to hide the navigation tab of html5
If you want to hide the navigation tag in html5, you can take advantage of the hidden attribute.
The hidden attribute specifies that the element is hidden.
Hidden elements are not displayed.
If you use this attribute, the element is hidden.
The hidden property can be set so that the user cannot see an element until certain conditions are met (such as selecting a check box, and so on). You can then use JavaScript to remove the hidden attribute, making the element visible.
Examples are as follows:
Document * {margin:0;padding: 0;} ul {list-style-type: none; overflow: hidden; position: fixed; top: 0; width: 100%;} li {float: left;} li a {display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none } li a:hover {background-color: red;} Home news contact us dynamically about us
When no hidden attribute is added to the navigation element, the output is as follows
After adding the hidden attribute to the navigation bar element, the output is as follows:
This is the end of the content of "how to hide the navigation tags of html5". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.