美文网首页
品优购 首页header

品优购 首页header

作者: Jay_ZJ | 来源:发表于2020-05-15 16:30 被阅读0次

设计

header.png
  1. header盒子必须有高度
<header class="header w">
    
</header>
.header {
  height: 105px;
  background-color: pink;
}
  1. 1号盒子是logo标志定位
    这里会用到LOGO SEO优化
<div class="logo">
    <h1>
        <a href="index.html" title="品优购商城">品优购商城</a>
    </h1>
</div>
.logo {
  position: absolute;
  top: 25px;
  width: 171px;
  height: 61px;
  background-color: skyblue;
}
.logo a {
  display: block;
  width: 171px;
  height: 61px;
  /* 京东 */
  /* font-size: 0; */
  /* 淘宝 */
  text-indent: -9999px;
  overflow: hidden;
  background: url(../images/logo.png) no-repeat;
}
  1. 2号盒子是search搜索模块定位
<div class="search">
    <input type="search" placeholder="语言开发">
    <button>搜索</button>
</div>
.search {
  position: absolute;
  top: 35px;
  left: 346px;
  width: 538px;
  height: 36px;
  border: 2px solid #b1191a;
}
.search input {
  float: left;
  padding-left: 10px;
  height: 32px;
  width: 454px;
}
.search button {
  float: left;
  width: 80px;
  height: 32px;
  font-size: 16px;
  color: #fff;
  background-color: #b1191a;
}
  1. 3号盒子是hotwords热词模块定位
<div class="hotwords">
  <a href="#" class="style_red">优惠购首发</a>
  <a href="#">亿元优惠</a>
  <a href="#">9.9元团购</a>
  <a href="#">每满99减30</a>
  <a href="#">办公用品</a>
  <a href="#">电脑</a>
  <a href="#">通信</a>
</div>
.hotwords {
  position: absolute;
  top: 66px;
  left: 346px;
}
.hotwords a {
  margin: 0 10px;
}
  1. 4号盒子是shopcar购物车模块
  • content 统计部分用绝对定位做
  • count统计部分不要给宽度,因为可能买的件数比较多,让件数撑开就好了,给一个高度
  • 一定注意左下角不是圆角,其余三个是圆角,写法 border-radius: 7px 7px 7px 0;
<div class="shopcar">
  我的购物车
  <i class="count">99</i>
</div>
.shopcar::before {
  margin-right: 5px;
  content: '\e93a';
  color: #b1191a;
  font-family: icomoon;
}
.shopcar::after {
  content: '\e905';
  font-family: icomoon;
  margin-left: 5px;
}
.count {
  position: absolute;
  top: -5px;
  left: 105px;
  /* right: 20px; */
  padding: 0 5px;
  height: 14px;
  line-height: 14px;
  color: #fff;
  background-color: #b1191a;
  border-radius: 7px 7px 7px 0;
}

相关文章

  • 品优购 首页header

    设计 header盒子必须有高度 1号盒子是logo标志定位这里会用到LOGO SEO优化 2号盒子是search...

  • 品优购 首页快捷导航

    说明 网站的首页一般使用index命名首页的头部和底部,根据模块化开发,样式要写到common.css里 快捷导航...

  • 品优购 首页导航栏

    设计 nav盒子通栏有高度,而且有个下边框 全部商品分类 可以左侧浮动 - dropdown 右边导航栏组左侧浮动...

  • 不好意思 还是没能逃过双十一

    十月底——电脑浏览器首页打开,手机浏览器打开,要么是京东买三免一,淘宝红包,上天猫购,唯品会,聚美优品,一年一次...

  • 品优购实战

    目标: 能会引入ico图标 能简单看懂网站优化的三大标签 能使用字体图标 ( 重点 ) 能说出我们css属性书写顺...

  • 品优购 底部

    设计 分为三部分: mod_service 服务模块 mod_help 帮助模块 mod_copyright 版权...

  • 品优购总结

    项目知识点: 1.@RequestBody--对应实体类封装和@RequestParam 2.mybatis中ex...

  • 品优购 favicon

    概念 favicon.ico 一般用于缩略的网站标志,它显示在浏览器的地址栏或者标签上,主流浏览器都支持。 使用流...

  • 品优购项目

    使用HTML+CSS+JS实现的模仿京东电商界面,文档及代码如下:品优购项目[https://github.com...

  • 品优购(IDEA版)-第一天

    品优购(IDEA版)-第一天 品优购IDEA版应该是2019年的新项目。目前只有视频。资料其他都还是旧的。 1.学...

网友评论

      本文标题:品优购 首页header

      本文链接:https://www.haomeiwen.com/subject/wsjcohtx.html