Multilevel menu CSS + Div

Source: Internet
Author: User

 

 

 

 

HTML prototype

View code

  • demos

    demos

    • zero dollars
    • wrapping text
    • styled form
    • active focus
    • hover/click>

      hover/click>

      • styled form
      • borders "href =" http://www.cnblogs.com/qq4004229/menu/nodots.html "> active focus
      • no active/focus borders "href =" http://www.cnblogs.com/qq4004229/menu/hover_click.html "> hover/click


    • shadow boxing
    • Image Map
    • fun backgrounds
    • fade scrolling
    • em sized images


  • Menus

    • Spies menu
    • Vertical menu
    • Enlarging list
    • Link Images
    • Non-rectangular
    • Jigsaw links
    • Circular links

  • Layouts

    • Fixed 1
    • Fixed 2
    • Fixed 3
    • Fixed 4
    • Minimum Width

  • Boxes

    • Spies menu
    • Vertical menu
    • Enlarging list
    • Link Images
    • Non-rectangular
    • Jigsaw links
    • Circular links

  • Mozilla

    • Drop down menu
    • Cascading menu
    • Content:
    • Mozzie box
    • Rainbow box
    • Snooker cue
    • Target practice
    • Two Tone headings
    • Shadow text

  • explorer

    explorer

    • example one
    • weft fonts
    • vertical align


  • Opacity

    • Opaque colours
    • Opaque menu
    • Partial opacity
    • Partial opacity II
    • <Hover/click

      • Styled form
      • Borders "href =" http://www.cnblogs.com/qq4004229/menu/nodots.html "> active focus
      • No active/focus borders "href =" http://www.cnblogs.com/qq4004229/menu/hover_click.html "> hover/click

Dddddddd

Implementation of a recursive method in C #

 

 

View code

Datatable menutable;
Protected   Void Page_load ( Object Sender, eventargs E)
{Litmenu. Text = Buildmenu (menutable. Select ( " Paretnid is null " ), "" );}
///   <Summary>
/// Navigation menu by Zhao Bo 2011-3-28
///   </Summary>
///
< Param name = " Drs "   />
///
< Param name = " Parentstr "   />
///   <Returns> </returns>
Public   String Buildmenu (datarow [] DRS, String Parentstr)
{
System. Text. stringbuilder sb =   New System. Text. stringbuilder ();
String Childmenu =   String . Empty;
SB. append ( "
< Ul > " );
// Paretnid // Accesspath // Accessname
Foreach (VAR Q In Drs)
{
Childmenu = Buildmenu (menutable. Select ( " Paretnid = "   + Q [ " ID " ]. Tostring (), Q [ " ID " ]. Tostring ());
If (Childmenu. Length & GT; 9 )
{
String Startcss =   String . Format ( " <! -- [If lte ie 6]> <a class = 'sub 'href = '#'> {0}
< Table >
< Tr >
< TD > <! [Endif] --> " , Q [ " Accessname " ]. Tostring ());
String Endcss =   " <! -- [If lte ie 6]> </TD>
</ Tr >
</ Table >
</ A > <! [Endif] --> " ;
SB. appendformat ( "
< Li > < A href = " Http://www.cnblogs.com/qq4004229/admin/%5C%22#%5C%22 "   Class = " Hide " > { 0 } </ A > { 2 }{ 1 }{ 3 } </ Li >
" , Q [ " Accessname " ]. Tostring (), childmenu, startcss, endcss );
}
Else
{
SB. appendformat ( "
< Li > < A href = " Http://www.cnblogs.com/qq4004229/admin/%5C%22%7B1%7D%5C%22 " > { 0 } </ A > </ Li >
" , Q [ " Accessname " ]. Tostring (), Q [ " Accesspath " ]. Tostring ());
}
}
SB. append ( " </Ul>
" );
Return SB. tostring ();
}

 

 

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.