京東頭部導航效果

<!DOCTYPE html>
<html lang="zh">javascript

<head>
    <meta charset="UTF-8">
    <title>導航條</title>
    <link rel="stylesheet" href="css/reset.css">
    <!-- 引入字體圖標樣式 -->
    <link rel="stylesheet" href="fa/css/all.css">
    <style>
        .top-bar-wapper {
            width: 100%;
            height: 30px;
            line-height: 30px;
            background-color: #e3e4e5;
            font: 12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
            border-bottom: 1px solid #ddd;
        }css

        .clearfix::before,
        .clearfi::after {
            content: '';
            display: table;
            clear: both;
        }html

        .top-bar {
            width: 1190px;
            height: 30px;
            margin: 0 auto;java


        }app

        .top-bar .location {
            float: left;
            height: 100%;
            line-height: 30px;
        }字體

        .location .current-city {
            position: relative;
            z-index: 10;
        }網站


        .top-bar .location:hover .current-city {
            background-color: #FFFFFF;
            border-bottom: 1px solid #FFFFFF;
            border-left: 1px solid #e3e4e5;
        }spa

        .top-bar .location:hover .city-list {htm

            display: block;
        }ip

        .location a,
        .short-cut a,
        .short-cut span,
        .short-cut i {
            color: #999;
        }

        .current-city {
            padding: 0 5px;
        }

        .current-city .fa-map-marker {

            font-size: 14px;
            color: #f10215;
        }


        /* 設置城市列表彈出層 */
        .city-list {
            position: absolute;
            width: 296px;
            height: 400px;
            border: 1px solid #e3e4e5;
            border-top: none;
            top: 30px;
            z-index: 3;
            display: none;
            /* 設置陰影 */
            box-shadow: 1px 0 1px rgba(0, 0, 0, .1);
        }


        .short-cut {
            line-height: 30px;
            float: right;
        }

        .short-cut li {
            float: left;
            margin: 0 9px;
        }

        .short-cut .short-speail,
        a:hover {
            color: #f10215;
        }

        .line {
            display: inline-block;
            width: 1px;
            height: 10px;
            background-color: #999;
        }
    </style>
</head>

<body>
    <div class="top-bar-wapper">

        <!-- 導航條內部 -->
        <div class="top-bar clearfix">

            <!-- 左側定位城市 -->
            <div class="location">
                <div class="current-city">
                    <i class="fa fa-map-marker"></i>
                    <a href="javascript:;">北京</a>
                </div>
                <!-- 城市列表 -->
                <div class="city-list"></div>
            </div>

            <!-- 右側信息 -->
            <ul class="short-cut">
                <li>
                    <a href="javascrript:;">你好,請登陸</a>
                    <a class="short-speail" href="javascrript:;">免費註冊</a>
                </li>
                <li><i class="line"></i></li>
                <li> <a href="javascrript:;">個人訂單</a></li>
                <li><i class="line"></i></li>
                <li> <a href="javascrript:;">個人京東</a><i class="fa fa-angle-down"></i></li>
                <li><i class="line"></i></li>
                <li> <a href="javascrript:;">京東會員</a></li>
                <li><i class="line"></i></li>
                <li> <a class="short-speail" href="javascrript:;">企業採購</a><i class="fa fa-angle-down"></i></li>
                <li><i class="line"></i></li>
                <li> <span>客戶服務</span><i class="fa fa-angle-down"></i></li>
                <li><i class="line"></i></li>
                <li> <span>網站導航</span><i class="fa fa-angle-down"></i></li>
                <li><i class="line"></i></li>
                <li> <span>手機京東</span></li>
            </ul>
        </div>

    </div>
</body>

</html>

相關文章
相關標籤/搜索