HTML+CSS Custom Navigation

Source: Internet
Author: User

Using CSS to write the navigation bar, first look at the effect:

Code area:

Html:

<!--Navigation Section -{block name= "NAV"}<nav>        <Divclass= "NAV">            <ul>                <Liclass= "First"><ahref= "{: URL (' Usermanage/index ')}"><imgsrc= "__public__/static/img/logo.jpg"></a></Li>                <Liclass= "Menu"><ahref= "{: URL (' Usermanage/index ')}">User Management</a></Li>                <Liclass= "Menu"><ahref= "{: URL (' Casemanage/index ')}">Use Case management</a></Li>                <Liclass= "Last">                    <DivID= "Login_name">                        <span><Iclass= "Layui-icon">& #xe612;</I>&nbsp;{$Think. Session.loginuser->name}</span>                    </Div>                    <DivID= "Logout">                        <ahref= "{: URL (' login/loginout ')}"><Iclass= "Layui-icon">& #xe609;</I>&nbsp;Exit</a>                    </Div>                </Li>            </ul>        </Div>    </nav>{/block}

Css:

/*Navigation Section*/. Nav{background:#000000;Height:60px;margin:0 Auto;}. Nav ul{List-style:None;}. Nav. First{float: Left;}. Nav. First img{width:120px;Height:60px;}. Menu{float: Left;Line-height:60px;text-align:Center;}. Menu a{text-decoration:None;Color: White;Display:Block;width:85px;Height:60px;font-size:15px;}. Menu A:hover{background:#0f0f0f;Color:Green;}/*Show Users, Exit*/. Nav. last{float: Right;Line-height:60px;Margin-right:20px;text-align:Center;}#login_name{font-size:15px;Color: White;Display:inline;}#logout{Display:inline;Margin-left:20px;}#logout a{Color: White;text-decoration:None;}/*Navigation Section*/

HTML+CSS Custom Navigation

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.