美文网首页
品优购 主体模块

品优购 主体模块

作者: Jay_ZJ | 来源:发表于2020-05-21 17:23 被阅读0次

设计

主体模块-main,是index里面专有的,之一需要新的样式文件 index.css

主体部分
  • mian盒子宽度为980像素,位置距离左边220px,给高度就不用清除浮动
  • main里面包含左侧盒子,左浮动,focus焦点图模块
  • main里面包含右侧盒子,有浮动,newflash新闻快报模块
    示意图

mian盒子

主体盒子在版心之中,在建立main盒子,让其离左边有足够距离

<div class="w">
     <div class="main">
     </div>
 </div>
.main {
  position: relative;
  margin-left: 220px;
  margin-top: 10px;
  width: 980px;
  height: 455px;
}

focus 焦点图

  • 很多张图片,使用ul li,通过改变位置来实现轮播
  • 上下张按钮使用绝对定位
  • 轮播图选择按钮组通过ol li制作,点击的添加active
      <div class="focus fl">
        <a href="" class="prev"></a>
        <a href="" class="next"></a>
        <ul>
          <li>
            <img src="./upload/focus.jpg" alt="">
          </li>
        </ul>
        <ol class="focus_circle">
          <li></li>
          <li class="active"></li>
          <li></li>
          <li></li>
          <li></li>
          <li></li>
          <li></li>
          <li></li>
        </ol>
      </div>
.focus .prev,
.focus .next {
  position: absolute;
  top: 50%;
  margin-top: -20px;
  color: #fff;
  width: 24px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  font-size: 18px;
  font-family: icomoon;
  background-color: rgba(0, 0, 0, .3);
}
.focus .prev {
  left: 0;
}
.focus .next {
  right: 0;
}
.focus .prev:hover,
.focus .next:hover {
  color: #e33333;
}
.focus_circle {
  position: absolute;
  left: 50px;
  bottom: 10px;
}
.focus_circle li {
  float: left;
  margin: 0 3px;
  border: 2px solid rgba(255, 255, 255, .5);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  background-color: transparent;
}
.focus_circle li.active {
  background-color: #fff;
}

newsflash 新闻快报模块

快报.png
  • 1号盒子为news 新闻模块 高度为 165px
  • 2号盒子为lifeservice生活服务模块,高度为209px
  • 3号盒子为bargain特价商品模块
news
      <div class="news">
          <div class="news-hd">
            <h5 class="fl">品优购快报</h5>
            <a href="#" class="more fr">更多</a>
          </div>
          <div class="news-bd">
            <ul>
              <li><a href="#"><strong>【重磅】</strong>爆款耳机5折秒!爆款耳机5折秒!</a></li>
              <li><a href="#"><strong>【重磅】</strong>母亲节,健康好礼低至5折!</a></li>
              <li><a href="#"><strong>【重磅】</strong>爆款耳机5折秒!</a></li>
              <li><a href="#"><strong>【重磅】</strong>爆款耳机5折秒!</a></li>
              <li><a href="#"><strong>【重磅】</strong>爆款耳机5折秒!</a></li>
            </ul>
          </div>
        </div>
.news {
  height: 165px;
  border: 1px solid #e4e4e4;
}
.news-hd {
  padding: 0 15px;
  height: 33px;
  line-height: 33px;
  background-color: #fff;
  border-bottom: 1px dotted #e4e4e4;
}
.news-hd h5 {
  font-size: 14px;
}
.news-hd .more::after {
  font-family: icomoon;
  content: '\e905';
}
.news-bd {
  padding: 5px 15px 0;
}
.news-bd ul li {
  height: 24px;
  line-height: 24px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
lifeservice
      <div class="lifeservice">
          <ul>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
            <li>
              <i></i>
              <p>话费</p>
            </li>
          </ul>
        </div>
.lifeservice {
  overflow: hidden;
  height: 209px;
  /* background-color: skyblue; */
  border: 1px solid #e4e4e4;
  border-top: 0;
  /* border-bottom: 0; */
}
.lifeservice ul {
  width: 252px;
}
.lifeservice ul li {
  float: left;
  width: 63px;
  height: 71px;
  text-align: center;
  border-right: 1px solid #e4e4e4;
  border-bottom: 1px solid #e4e4e4;
}
.lifeservice ul li:hover {
  color: #b1191a;
}
.lifeservice ul li i {
  display: inline-block;
  margin: 12px 0 0 5px;
  width: 24px;
  height: 28px;
  background: url(../images/icons.png) no-repeat -19px -15px;
}
bargain
<div class="bargain">
    <img src="./upload/bargain.jpg" alt="">
</div>
.bargain {
  margin-top: 5px;
}

相关文章

  • 品优购 主体模块

    设计 主体模块-main,是index里面专有的,之一需要新的样式文件 index.css mian盒子宽度为98...

  • 品优购 推荐模块

    设计 这个部分分为左右两个模块,较为简单 左侧图片加文字,居中 - recom_hd 右侧用ul li加链接放图片...

  • 品优购 模块化开发

    概念 将一个项目按照功能划分为一个功能一个模块,互不影响。 优点 具有重复使用,更换方便等优点 代码模块化 有些样...

  • 品优购实战

    目标: 能会引入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.学...

  • 使用idea实现品优购项目搭建

    1、使用idea实现品优购项目搭建 本篇文章只针对品优购第一天使用 IDEA 搭建项目。看到网上很多人都不会搭建,...

网友评论

      本文标题:品优购 主体模块

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