In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you how to achieve the effect of a drop-down menu in css3. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
Effect:
First, let's look at the core HTML snippet code:
HomeLanguageJava https://www.xieniao.com/wintersun">CSharpScriptRubyPythonArticleshttps://www.xieniao.com/wintersun">.nethttps://www.xieniao.com/wintersun">Databasehttps://www.xieniao.com/wintersun">WebDevhttp://wintersun.jb51.net">About
Then define the style, using the CSS selector we can specifically and advance the target individual element buried HTML structure without the need for additional id or classes. The first hidden submenu by targeting any UL in a UL and display:block; in order to make these menus reproduce they need to be exchanged into blocks of elements in the hover of Lee. This > sub-selection ensures that only the child UL Lee hovers over the target, not all the submenus appear at once. Then use CSS3 properties such as gradient, box shadow and boundary radius.
Body {background: # efefef;font-family:Verdana;} nav ul ul {display: none;} nav ul li:hover > ul {display: block;}
Nav ul {background: # efefef;background: linear-gradient (top, # efefef 0% recorder bbbbbbbbb 100%); background:-moz-linear-gradient (top, # efefef 0% recorder bbbbbbbbb 100%); background:-webkit-linear-gradient (top, # efefef 0% repartee bbbbbbbbbbbb 100%); box-shadow: 0px 0px 9px rgba (0meme 0meme 0.15); padding: 020pxbordercolor radius: 10pxscape listwright style: none;position: relative;display inline-table: } nav ul:after {content: "; clear: both;display: block;}
Nav ul li {float: left;} nav ul li:hover {background: # 4b545fBoxbackground: linear-gradient (top, # 4f5964 0% 4f5964 5f6975 40%); background:-moz-linear-gradient (top, # 4f5964 0% Magazine 5f6975 40%); background:-webkit-linear-gradient (top, # 4f5964 0% paraphrase 5f6975 40%);} nav ul li:hover a {color: # fff;} nav ul li a {display: block;padding: 5px 40pxitColor: # 7575ittextDecoration none: }
Nav ul ul {background: # 5f6975 borderhouse radius: 0pxposition: absolute;top: 100%;} nav ul ul li {float: none;border-top: 1px solid # 6b727c borderhouse bottom: 1px solid # 575f6a nav ul ul li a: relative;} nav ul ul li a {padding: 5px 40pxash color: # fff;} nav ul ul li a:hover {background: # 4b545f;} nav ul ul ul {position: absolute;left: 100% X top: 0: } these are all the contents of the article "how to achieve a drop-down menu effect in css3". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.