Demo10:简单天猫导航

简单天猫导航的实现

效果展示

这里写图片描述

代码实现

<!DOCTYPE html>
<html>
 <head>
  <title> new document </title>
  <meta charset="utf-8" />
  <style>
    #top{
        width:900px;
        height:40px;
        margin:auto;
        background:#ff0066;
    }
    #top p{
        width:210px;
        height:40px;
        background:#ff0033;
    }
    #top p a{
        float:left;
        color:#fff;
        text-decoration:none;
        line-height:40px;
        padding-left:15px;
        font-weight:bold;
    }
    p,ul,li,h3{
        margin:0px;
        padding:0px;
        list-style:none;
    }

    #top p{
        float:left;
    }
    #top ul{
        float:left;
    }
    #top ul li {
        float:left;
    }
    #top ul li a{
        display:block;
        width:80px;
        height:40px;
        text-decoration:none;
        text-align:center;
        line-height:40px;
        color:#fff;
        font-weight:900;
    }
    #top ul li a:hover{
        background:#ff0033;
    }

    #category{
        width:900px;
        margin:auto;
    }
    #main_category{
        width:206px;
        border:2px solid #ff0033;
        border-top:none;
        background:#fafafa;
        height:400px;
    }
    #main_category ul li a{
        font-size:14px;
        color:#333;
        text-decoration:none;
        font-weight:normal;
        line-height:28px;
    }
    #main_category ul li h3{
        width:186px;
        padding-left:10px;
        border:1px solid transparent;
        border-left:none;
        border-right:none;
    }
    #main_category ul li h3:hover{
        border:1px solid #ddd;
        border-left:none;
        border-right:none;
        background:#fff;
    }
    #main_category ul li{
        border-bottom:1px solid #fff;
    }
    #main_category ul{
        padding-top:5px;
    }
  </style>
 </head>

 <body>
    <div id="top">
        <p>
            <a href="#">全部商品分类</a>
        </p>
        <ul>
            <li>
                <a href="#">尚天猫</a>
            </li>
            <li>
                <a href="#">喵鲜生</a>
            </li>
            <li>
                <a href="#">天猫会员</a>
            </li>
            <li>
                <a href="#">电器城</a>
            </li>
            <li>
                <a href="#">天猫超市</a>
            </li>
            <li>
                <a href="#">医药馆</a>
            </li>
            <li>
                <a href="#">阿里旅行</a>
            </li>
            <li>
                <a href="#">天猫国际</a>
            </li>
        </ul>
    </div>
    <!-- 全部商品分类 -->
    <div id="category">
        <div id="main_category">
            <ul>
                <li>
                    <h3>
                        <a href="#">女装 /内衣</a>
                    </h3>
                </li>
                <li>
                    <h3>
                        <a href="#">男装 /运动户外</a>
                    </h3>
                </li>
                <li>
                    <h3>
                        <a href="#">女鞋 /男鞋 /箱包</a>
                    </h3>
                </li>
                <li>
                    <h3>
                        <a href="#">化妆品 /个人护理</a>
                    </h3>
                </li>
                <li>
                    <h3>
                        <a href="#">腕表 /珠宝饰品 /眼镜</a>
                    </h3>
                </li>
                <li>
                    <h3>
                        <a href="#">手机 /数码 /电脑办公</a>
                    </h3>
                </li>
            </ul>
        </div>
    </div>

 </body>
</html>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值