音悦Tai-音悦商城项目(头部、首页部分以及购物须知部分)

一、头部部分

 头部部分由三部分组成:上边官方介绍、中间搜索栏、下边导航栏

头部html部分

<body>
    <header>
         <!--官方介绍-->
        <div class="head_1">
            <img src="./img/head/log.png" alt="">
            <ul>
                <li><a href="#">官方微博</a>
                    <img src="./img/head/weibo.png" alt="">
                </li>
                <li><a href="#">关注微信</a>
                    <img src="./img/head/weixin.jpg" alt="">
                </li>
                <li><a href="#">购物须知</a></li>
            </ul>
        </div>
         <!--搜索栏-->
        <div class="head_2">
            <img src="./img/head/logo.png" alt="">
            <div class="search">
                <input type="text" placeholder="搜索偶像、商品">
                <a href="#"></a>
            </div>
            <ul>
                <li>
                    <img src="./img/head/avatar.png" alt="">
                    <a href="">登录</a>
                </li>
                <li>
                    <a href="">我的订单</a>
                </li>
                <li>
                    <img src="./img/head/cart.png" alt="">
                    <a href="">购物车</a>
                </li>
            </ul>
        </div>
  <!--导航栏-->
        <div class="head_3">
            <a href="#">艺人分类</a>
            <ul>
                <li><a href="./shop.html">首页</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>
    </header>

头部css部分 

* {
  margin: 0;
  padding: 0;
}

header {
  width: 100%;
  overflow: auto;
  background-color: #222;
}
header .head_1 {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  margin-left: 100px;
}
header .head_1 ul li {
  display: inline-block;
  width: 150px;
  border: 1px solid white;
  text-align: center;
  line-height: 30px;
}
header .head_1 ul li a {
  text-decoration: none;
  color: #ccc;
}
header .head_1 ul li img {
  width: 130px;
  height: 130px;
  border: 10px solid white;
  display: none;
  position: absolute;
}
header .head_1 ul li:hover img {
  display: block;
}
header .head_1 ul li:hover {
  background-color: #fff;
  color: #222;
}
header .head_1 ul li:nth-child(3):hover {
  background-color: black;
}
header .head_1 ul li:nth-child(3):hover:nth-child(3):hover a {
  color: #fd026b;
}
header .head_2 {
  height: 90px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: distribute;
      justify-content: space-around;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
header .search {
  position: relative;
}
header .search input {
  width: 444px;
  height: 44px;
  padding-left: 20px;
  border: none;
  background: url(../img/head/search_icon.png) 0 -40px;
  outline: none;
}
header .search input:focus {
  background: url(../img/head/search_icon.png) 0 0px;
}
header .search input:focus + a {
  background: url(../img/head/search_icon.png) -456px -51px;
}
header .search a {
  width: 30px;
  height: 30px;
  position: absolute;
  top
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值