I collected some good drop-down menus.

Source: Internet
Author: User
I have collected a few good drop-down menu effects. The current drop-down menu is more and more compatible, and no js is the best. However, if you can achieve the effect with the least code, it is also good.
First, the js used is very short and clear.

<Style> * {font: normal 14px/1.5em "";} li {list-style: none;} span {display: block; line-height: 25px ;} a {text-decoration: none; display: block; margin: 5px ;}. class1 {width: 100px; height: 25px; overflow-y: hidden; border: 1px solid # ffe663; text-align: center; background: # fff2d9 ;}. class2 {width: 100px; height: 135px; overflow-y: hidden; border: 1px solid # ffe663; text-align: center; background: # fff2d9;}: hover {border: 1px dashed red ;}</style> <p> <li onmouseover = "this. className = 'class2' "onmouseout =" this. className = 'class1' "class =" class1 "> The following menu is available: Wan Shui Qian Shan, Wan Shui Wan Ma Pentium </li> </p>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]


This is also good.

<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN "" http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd "> <! -- Saved from url = (0054) http://www.jluvip.com/works/css/dropmenu/dropmenu.html --> <HTML xmlns =" http://www.w3.org/1999/xhtml "> <HEAD> <TITLE> the ultimate css only dropdown menu </TITLE> <META http-equiv = Content-Type content =" text/html; charset = gb2312 "> <style type = text/css>. menu {FONT-SIZE: 0.85em; WIDTH: 750px; FONT-FAMILY: verdana, sans-serif; POSITION: relative }. menu UL {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none }. menu ul li {FLOAT: left; POSI TION: relative }. menu ul li a {BORDER-RIGHT: # fff 1px solid; BORDER-TOP: # fff 1px solid; DISPLAY: block; PADDING-LEFT: 10px; BACKGROUND: # dfc184; BORDER-LEFT: # fff 0px solid; WIDTH: 139px; COLOR: #000; LINE-HEIGHT: 3em; BORDER-BOTTOM: # fff 0px solid; HEIGHT: 3em; TEXT-DECORATION: none }. menu ul li a: visited {BORDER-RIGHT: # fff 1px solid; BORDER-TOP: # fff 1px solid; DISPLAY: block; PADDING-LEFT: 10px; BACKGROUND: # dfc184; BORDER-LEFT: # fff 0px solid; WIDTH: 139px; COLOR: #000; LINE-HEIGHT: 3em; BORDER-BOTTOM: # fff 0px solid; HEIGHT: 3em; TEXT-DECORATION: none} * HTML. menu ul li a {WIDTH: 139px }. menu ul li a: visited {WIDTH: 139px }. menu ul li ul {DISPLAY: none} TABLE {FONT-SIZE: 1em; MARGIN:-1px; BORDER-COLLAPSE: collapse }. menu ul li: hover A {BACKGROUND: # bd8d5e; COLOR: # ff F }. menu ul li: hover UL {MARGIN-TOP: 1px; DISPLAY: block; LEFT: 0px; WIDTH: 150px; POSITION: absolute; TOP: 3em }. menu ul li: hover ul li ul {DISPLAY: none }. menu ul li: hover ul li a {PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; BACKGROUND: # faeec7; PADDING-BOTTOM: 5px; WIDTH: 129px; COLOR: #000; LINE-HEIGHT: 1.2em; PADDING-TOP: 5px; HEIGHT: auto }. menu ul li: hover ul li. drop {BACKGROUND: url(drop.png) # c9c9a7 no-repeat right bottom }. menu ul li: hover ul li a: hover {BACKGROUND: # c9c9a7; COLOR: #000 }. menu ul li: hover UL {DISPLAY: block; LEFT: 150px; WIDTH: 150px; POSITION: absolute; TOP: 0px }. menu ul li: hover UL. left {LEFT:-150px }</style> <! -- [If lte IE 6]> <link rel = "stylesheet" media = "all" type = "text/css" href = "final_drop_ie.css? 1.1.9 "/> <! [Endif] --> <META content = "MSHTML 6.00.6000.16441" name = GENERATOR> </HEAD> <BODY> <UL> <LI> DEMOS <! -- [If IE 7]> <! --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL> <LI> zero dollars advertising page </LI> <LI> wrapping text around images </ LI> <LI> styled form </LI> <LI> active focus </LI> <LI> hover/click with no borders <! -- [If IE 7]> <! --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL> <LI> styled form </LI> <LI> removing active/focus borders </LI> <LI> hover/click </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> <LI class = upone> shadow boxing </LI> <LI> image map for detailed information </LI> <LI> fun with background images </LI> <LI> fade scrolling </LI> <LI> em image sizes compared </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> <LI> BOXES <! -- [If IE 7]> --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL> <LI> a coded list of spies </LI> <LI> vertical menu </LI> <LI> enlarging unordered list </LI> <LI> link images </LI> <LI> non-rectangular </LI> <LI> jigsaw links </LI> <LI> circular links </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> <LI> MOZILLA <! -- [If IE 7]> <! --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL> <LI> drop down menu </LI> <LI> cascading menu </LI> <LI> content: </LI> <LI> mozzie box </LI> <LI> I can build a rainbow with transparent borders </LI> <LI> a snooker cue using border art </LI> <LI> target practice </LI> <LI> two tone headings </LI> <LI> shadow text </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> <LI> EXPLORER <! -- [If IE 7]> <! --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL> <LI> the first example for Internet Explorer </LI> <LI> weft fonts </ LI> <LI> vertically aligning text </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> <LI> OPACITY <! -- [If IE 7]> <! --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL> <LI> a color wheel using opaque colours </LI> <LI> a menu using opacity </LI> <LI> partial opacity II </LI> <LI> HOVER/CLICK <! -- [If IE 7]> <! --> <! -- <! [Endif] --> <TABLE> <TBODY> <TR> <TD> <UL class = left> <LI> styled form </LI> <LI> removing active/focus borders </LI> <LI> hover/click </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> </UL> </TD> </TR> </TBODY> </TABLE> <! -- [If lte IE 6]> <! [Endif] --> </LI> </UL> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]


Http://www.jluvip.com/works/css/dropmenu/dropmenu.html
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.