前端作业(7)

品优购项目总练习

总结:建议还是跟着pink老师做吧,本人是两种结合,即一边跟着其他博主写的代码打,一边跟着老师打码,我的话就是打完跟一遍老师的思路,理一下思路,有时候,好吧(~ ~)经常打错,然后还要自己找自己的代码那里打错了,就一个字‘累’,两个字‘累啊’,真是痛并快乐着,痛就是找的要死要活的,有时候就只是一个空格的事,然后嘞,把全部代码都看了一遍,有时候是把类名写错啦,大家在打的时候可以从这入手,我的大几率错误都这样;快乐的话就是,找到并改正好喽!

因为没有那些图标和品优购的图,所以我做的会有些不一样,差不多都是用ps截图的,也因此嘞,我的作品有点糊(所以如果屏幕前的你也想截图的话,还是找个清晰点的截图吧,截老师的图也还OK,咳咳,有几个图标,我是这么干的),好吧,说白了,我就是懒得去找资料啦!

所用的的文件:

 

 

 

 

 index.html

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>品优购商城-正品低价、品质保障、配送及时、轻松购物!</title>
    <!-- 网站说明 -->
    <meta name="description" content="品优购商城-专业的综合网上购物商城,为您提供正品低价的购物选择、优质便捷的服务体验。商品来自全球数十万品牌商家,囊括家电、手机、电脑、服装、居家、母婴、美妆、个护、食品、生鲜等丰富品类,满足各种购物需求。"/>
    <!-- 关键字 -->
    <meta name="Keywords" content="网上购物,网上商城,家电,手机,电脑,服装,居家,母婴,美妆,个护,食品,生鲜,品优购商城"/>
    <!-- favicon图标引入 -->
    <link rel="shortcut icon" href="favicon.ico" type="images/x-icon"/>
    <!-- 初始化样式 -->
    <link rel="stylesheet" href="css/base.css">
    <!-- 公共样式 -->
    <link rel="stylesheet" href="css/common.css">
    <!-- 引用首页的css样式 -->
    <link rel="stylesheet" href="css/index.css">
</head>
<body>
    <!-- 快捷导航模块 -->
    <section class="shortcut">
        <div class="w">
            <div class="fl">
                <ul>
        <li>品优购欢迎您!&nbsp;</li>
        <li>
            <a href="#">请登录 &nbsp;</a><a href="register.html" class="style_red">免费注册</a>
        </li>
                </ul>
            </div>
            <div class="fr">
                <ul>
                    <li>我的订单</li>
                    <!-- 秀啊,这下面的li就是竖线(隔离线) -->
                    <li></li>
                    <li class="arow-icon">我的品优购</li>
                    <li></li>
                    <li>品优购会员</li>
                    <li></li>
                    <li>企业采购</li>
                    <li></li>
                    <li class="arow-icon">关注品优购</li>
                    <li></li>
                    <li class="arow-icon">客户服务</li>
                    <li></li>
                    <li class="arow-icon">网址导航</li>
                </ul>
            </div>
        </div>
    </section>
    <!-- header头部模块 -->
    <header class="header w">
        <!-- logo部分 -->
     <div class="logo">
        <h1>
            <img src="样式类图片文件夹(image)/logo.png" alt=""     width="171px"  height="61px">
            <a href="index.html" title="品优购商城">品优购商城</a>
        </h1>
     </div>
     <!-- 搜索模块 -->
     <div class="search">
        <input type="search" name="" id="" placeholder="语言开发">
        <button>搜索</button>
     </div>
     <!-- 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>
     <!-- 购物车模块 -->
     <div class="shopcar">
        我的购物车
        <i class="count">8</i>
     </div>
    </header>
    <!-- nav模块制作 -->
    <div class="nav">
        <div class="w">
            <div class="dropdown">
                <div class="dt">
                    全部商品分类
                </div>
                <div class="dd">
                    <ul>
                        <li><a href="#">家用电器</a></li>
                        <li><a href="list.html">手机</a><a href="#">、数码</a><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>
                        <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>
            <div class="navitems">
                <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>
    </div>
    <!-- 首页专有模块main -->
    <div class="w">
        <div class="main">
            <div class="focus">
                <ul>
                    <li><img src="样式类图片文件夹(image)/n one.jpg" alt="" width="721px" height="455px"></li>
                </ul>
            </div>
            <div class="newsflash">
                <div class="news">
                    <div class="news-hd">
                        <h5>品优购快报</h5>
                        <a href="#" class="more">更多</a>
                    </div>
                    <div class="news-bd">
                        <ul>
                            <li><a href="#"><strong>[特惠] </strong>备战开学季 全民半价购物码</a></li>
                            <li><a href="#"><strong>[公告] </strong>品优稳占家电网购六成份额</a></li>
                            <li><a href="#"><strong>[特惠] </strong>百元中秋全品类礼券限量领</a></li>
                            <li><a href="#"><strong>[公告] </strong>上品优生鲜 享阳澄湖大闸蟹</a></li>
                            <li><a href="#"><strong>[特惠] </strong>每日享折扣品优 品优游</a></li>
                        </ul>
                    </div>
                </div>
                <div class="lifeservice">
                    <ul>
                        <li>
                            <i><img src="样式类图片文件夹(image)/one.jpg" alt="" width="24px" height="28px"></i>
                            <p>话费</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/two.jpg" alt="" width="24px"  height="28px"></i>
                            <p>机票</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/six.jpg" alt="" width="24px"  height="28px"></i>
                            <p>电影票</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/seven.jpg" alt="" width="24px"  height="28px"></i>
                            <p>游戏</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/two.jpg" alt="" width="24px" height="28px"></i>
                            <p>机票</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/eight.jpg" alt="" width="24px" height="28px"></i>
                            <p>加油卡</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/nine.jpg" alt="" width="24px" height="28px"></i>
                            <p>机票</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/ten.jpg" alt="" width="24px"  height="28px"></i>
                            <p>酒店</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/two.jpg" alt="" width="24px"  height="28px"></i>
                            <p>机票</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/eleven.jpg" alt="" width="24px"  height="28px"></i>
                            <p>火车票</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/twelve.jpg" alt="" width="24px"  height="28px"></i>
                            <p>礼品卡</p>
                        </li>
                        <li>
                            <i><img src="样式类图片文件夹(image)/thirteen.jpg" alt="" width="24px"  height="28px"></i>
                            <p>白条</p>
                        </li>
                    </ul>
                </div>
                <div class="bargain">
                    <img src="样式类图片文件夹(image)/three.jpg" alt="" width="250px" height="75px" >
                </div>
            </div>
        </div>
    </div>
    <!-- 推荐模块 -->
    <div class="w recom">
        <div class="recom_hd">
            <img src="样式类图片文件夹(image)/five.jpg" alt="" width="205px" height="163px">
        </div>
        <div class="recom_bd">
            <ul>
                <li><img src="样式类图片文件夹(image)/fourteen.jpg" alt="" width="205px" height="163px"></li>
                <li><img src="样式类图片文件夹(image)/fourteen.jpg" alt="" width="205px" height="163px"></li>
                <li><img src="样式类图片文件夹(image)/fourteen.jpg" alt="" width="205px" height="163px"></li>
                <li><img src="样式类图片文件夹(image)/fourteen.jpg" alt="" width="205px" height="163px"></li>
            </ul>
        </div>
    </div>
    <!-- 楼层区域模块 -->
    <div class="floor">
        <!-- 1楼家用电器模块 -->
        <div class="w jiadian">
            <div class="box_hd">
                <h3>家用电器</h3>
                <div class="tab_list">
                    <ul>
                        <li><a href="#" class="style_red">热门</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>
                        <li><a href="#">高端电器</a></li>
                    </ul>
                </div>
            </div>
            <div class="box_bd">
                <div class="table_content">
                    <div class="table_list_item">
                        <div class="col_210">
                            <ul>
                                <li><a href="#">节能补贴</a></li>
                                <li><a href="#">4K电视</a></li>
                                <li><a href="#">空气净化器</a></li>
                                <li><a href="#">IH电饭煲</a></li>
                                <li><a href="#">滚筒洗衣机</a></li>
                                <li><a href="#">电热水器</a></li>
                            </ul>
                            <a href="#">
                                <img src="样式类图片文件夹(image)/fifteen.jpg" alt=""width="210px" height="279px">
                            </a>
                        </div>
                        <div class="col_329">
                            <a href="#">
                                <img src="样式类图片文件夹(image)/sixteen.jpg" alt="" width="329px" height="361px">
                            </a>
                        </div>
                        <div class="col_221">
                            <a href="#" class="bb">
                                <img src="样式类图片文件夹(image)/seventeen.jpg" alt="" width="221px" height="180px">
                            </a>
                            <a href="#">
                                <img src="样式类图片文件夹(image)/eighteen.jpg" alt="" width="221px" height="180px">
                            </a>
                        </div>
                        <div class="col_221">
                            <a href="#">
                                <img src="样式类图片文件夹(image)/nineteen.jpg" class="h_73" alt="" width="221px" height="361px">
                            </a>
                        </div>
                        <div class="col_219">
                            <a href="#" class="bb">
                                <img src="样式类图片文件夹(image)/twenty.jpg" alt="" width="221px" height="180px">
                            </a>
                            <a href="#">
                                <img src="样式类图片文件夹(image)/twenty-one.jpg" alt="" width="221px" height="180px">
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 2楼手机模块 -->
        <div class="w shouji">
            <div class="box_hd">
                <h3>手机通讯</h3>
                <div class="tab_list">
                    <ul>
                        <li><a href="#" class="style_red">热门</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>
                        <li><a href="#">高端电器</a></li>
                    </ul>
                </div>
            </div>
            <div class="box_bd">
                <div class="table_content">
                    <div class="table_list_item">
                        <div class="col_210">
                            <ul>
                                <li><a href="#">节能补贴</a></li>
                                <li><a href="#">4K电视</a></li>
                                <li><a href="#">空气净化器</a></li>
                                <li><a href="#">IH电饭煲</a></li>
                                <li><a href="#">滚筒洗衣机</a></li>
                                <li><a href="#">电热水器</a></li>
                            </ul>
                            <a href="#">
                                <img src="样式类图片文件夹(image)/fifteen.jpg" alt=""width="210px" height="279px">
                            </a>
                        </div>
                        <div class="col_329">
                            <a href="#">
                                <img src="样式类图片文件夹(image)/sixteen.jpg" alt="" width="329px" height="361px">
                            </a>
                        </div>
                        <div class="col_221">
                            <a href="#" class="bb">
                                <img src="样式类图片文件夹(image)/seventeen.jpg" alt="" width="221px" height="180px">
                            </a>
                            <a href="#">
                                <img src="样式类图片文件夹(image)/eighteen.jpg" alt="" width="221px" height="180px">
                            </a>
                        </div>
                        <div class="col_221">
                            <a href="#">
                                <img src="样式类图片文件夹(image)/nineteen.jpg" class="h_73" alt="" width="221px" height="361px">
                            </a>
                        </div>
                        <div class="col_219">
                            <a href="#" class="bb">
                                <img src="样式类图片文件夹(image)/twenty.jpg" alt="" width="221px" height="180px">
                            </a>
                            <a href="#">
                                <img src="样式类图片文件夹(image)/twenty-one.jpg" alt="" width="221px" height="180px">
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>        
    <!-- 底部模块的制作 -->
    <div class="w">
    <footer class="footer">
            <div class="mod_service">
                <ul>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>正品保障</h4>
                            <p>正品保障,提供发票</p>
                        </div>
                    </li>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>极速物流</h4>
                            <p>急速物流,急速送达</p>
                        </div>
                    </li>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>无忧售后</h4>
                            <p>7天无理由退换货</p>
                        </div>
                    </li>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>特色服务</h4>
                            <p>私人定制家电套餐</p>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="mod_help">
                <dl>
                    <dt>服务指南</dt>
                    <dd><a href="#">购物流程</a></dd>
                    <dd><a href="#">会员介绍</a></dd>
                    <dd><a href="#">生活旅行/团购</a></dd>
                    <dd><a href="#">常见问题</a></dd>
                    <dd><a href="#">大家电</a></dd>
                    <dd><a href="#">联系客服</a></dd>
                </dl>
                <dl>
                    <dt>配送方式</dt>
                    <dd><a href="#">上门自提</a></dd>
                    <dd><a href="#">211限时达</a></dd>
                    <dd><a href="#">配送服务查询</a></dd>
                    <dd><a href="#">配送费收取标准</a></dd>
                    <dd><a href="#">海外配送</a></dd>
                </dl>
                <dl>
                    <dt>支付方式</dt>
                    <dd><a href="#">货到付款</a></dd>
                    <dd><a href="#">在线支付</a></dd>
                    <dd><a href="#">分期付款</a></dd>
                    <dd><a href="#">邮局汇款</a></dd>
                    <dd><a href="#">公司转账</a></dd>
                    <dd><a href="#"></a></dd>
                </dl>
                <dl>
                    <dt>售后服务</dt>
                    <dd><a href="#">售后政策</a></dd>
                    <dd><a href="#">价格保护</a></dd>
                    <dd><a href="#">退款说明</a></dd>
                    <dd><a href="#">返修/退换货</a></dd>
                    <dd><a href="#">取消订单</a></dd>
                    <dd><a href="#"></a></dd>
                </dl>
                <dl>
                    <dt>特色服务</dt>
                    <dd><a href="#">夺宝岛</a></dd>
                    <dd><a href="#">DIY装机</a></dd>
                    <dd><a href="#">延保服务</a></dd>
                    <dd><a href="#">品优购E卡</a></dd>
                    <dd><a href="#">品优购通信</a></dd>
                    <dd><a href="#"></a></dd>
                </dl>
                <dl>
                    <dt>帮助中心</dt>
                    <dd>
                        <img src="样式类图片文件夹(image)/二维码.jpg" alt="" width="80px" height="80">品优购客户端
                    </dd>
                </dl>
            </div>
            <div class="mod_copyright">
                <div class="links">
                    <ul>
                        <a href="#">关于我们</a>|<a href="#">联系我们</a>|<a href="#">联系客服</a>|<a href="#">商家入驻</a>|
                        <a href="#">营销中心</a>|<a href="#">手机品优购</a>|<a href="#">友情链接</a>|<a href="#">销售联盟</a>|
                        <a href="#">品优购社区</a>|<a href="#">品优购公益</a>|<a href="#">English Site</a>|<a href="#">Contact U</a>
                    </ul>
                </div>
                <div class="copyright">
                    地址:北京市昌平区建材城西路金燕龙办公楼一层 
                    邮编:100096 电话:400-618-4000 传真:010-82935100 
                    邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                </div>
            </div>
        </div>
    </footer>
</body>
</html>

index.css:

/* 首页专有模块 */
.main {
    width: 980px;
    height: 455px;
    background-color: #fff;
    margin-left: 220px;
    margin-top: 10px;
}
.main .focus {
    float: left;
    width: 721px;
    height: 455px;
}
.newsflash {
    float: right;
    width: 250px;
    height: 455px;
    border: 1px solid #e4e4e4;
}
.news {
    height: 165px;
    width: 250px;
    border-bottom: 1px solid #e4e4e4;
}
.news-hd {
    height: 33px;
    line-height: 33px;
    border-bottom: 1px dotted #e4e4e4;
    padding: 0 15px;
}
.news-hd h5 {
    float: left;
    font-size: 14px;
}
.news-hd .more {
    float: right;
}
.news-hd .more::after {
    content: '\e90b';
    font-family: 'icomoon';
}
.news-bd {
    padding: 5px 15px 0;
}
.news-bd ul li {
    height: 24px;
    line-height: 24px;
    /* 超出的文字显示省略号 */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.lifeservice {
    overflow: hidden;
    height: 209px;
    border-bottom: 1px solid #e4e4e4;
    border-top: 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 i {
    display: inline-block;
    width: 24px;
    height: 28px;
    margin-top: 12px;
    /* 我的材料都是截图 所以这个用不了 害 累死个人了 菜鸟的材料受限就只能这样了
    background: url(../样式类图片文件夹(image)/two.jpg) ; */
}
.bargain img {
    margin-top: 5px;
}
/* 推荐模块 */
.recom {
    height: 163px;
    background-color: #ebebeb;
    margin-top: 12px;
}
.recom_hd {
    float: left;
    width: 205px;
    height: 163px;
    text-align: center;
    line-height: 163px;
    background-color: #5c5251;
}
.recom_bd {
    float: left;
}
.recom_bd ul li {
    position: relative;
    float: left;
}
.recom_bd ul li img {
    width: 248px;
    height: 163px;
}
.recom_bd ul li:nth-child(-n+3)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    width: 1px;
    height: 145px;
    background-color: #ddd;
}
/* 1楼家用电器模块 */
.box_hd {
    height: 30px;
    border-bottom: 2px solid #c81623;
}
.box_hd h3 {
    float: left;
    font-size: 18px;
    font-weight: 400;
    color: #c81623;
}
.tab_list {
    float: right;
    line-height: 30px;
}
.tab_list ul li {
    float: left;
}
.tab_list ul li a {
    margin: 0 15px;
}
.floor .w {
    margin-top: 30px;
}
.box_bd {
    height: 361px;
}
.table_list_item>div {
    float: left;
    height: 361px;
}
.col_210 {
    width: 210px;
    text-align: center;
    background-color: #f9f9f9;
}
.col_210 ul {
    padding-left: 12px;
}
.col_210 ul li {
    float: left;
    width: 85px;
    height: 34px;
    text-align: center;
    line-height: 34px;
    margin-right: 10px;
    border-bottom: 1px solid #ccc;
}
.col_329 {
    width: 329px;
}
.col_221 {
    text-align: center;
    width: 221px;
    border-right: 1px solid #ccc;
}
/* .col_221 a img {
    margin-top: 26px;
} */
.col_219 {
    text-align: center;
    width: 219px;
}
/* .col_219 a img {
    margin-top: 26px;
} */
/* .col_221 .h_73 {
    margin-top: 73px;
} */
.bb {
    display: block;
    border-bottom: 1px solid #ccc;
}

base.css:

/* 所有标签的内外边距清零 */
* {
    margin:0;
    padding:0;
    box-sizing: border-box;
}
/* 斜体文字不倾斜 */
em,
i {
    font-style:normal;
}
/* 去掉li的小圆点 */
li {
    list-style:none;
}
img {
    /* border:0照顾低版本浏览器 如果 图片外面包含了链接会有边框的问题 */
    border:0;
    /* 取消图片底侧有空白缝隙的问题 */
    vertical-align: middle;
}
button {
    /* 当鼠标经过button 按钮的时候,鼠标变成小手 */
    cursor:pointer;
}
a {
    color:#666;
    text-decoration:none;
}
a:hover {
    color:#c81623;
}
button,
input {
    font-family:Microsoft YaHei,Heiti SC,tahoma,arial,Hiragino Sans GB,"\5B8B\4F53",sans-serif;
    /* 默认有黑色边框,去掉 */
    border: 0;
    outline: none;
}
body {
    /* css 抗锯齿形 让文字显示的更加清晰 */
    -webkit-font-smoothing:antialiased;
    background-color:#fff;                                             
    /* "\5B8B\4F53":宋体 兼容性up */
    font:12px/1.5 Microsoft YaHei,Heiti SC,tahoma,arial,Hiragino Sans GB,"\5B8B\4F53",sans-serif;color:#666;
}
.hide,
.none {
    display:none;
}
/* 清除浮动 */
.clear-fix:after {
    visibility:hidden;
    clear:both;
    display:block;
    content:".";
    height:0;
}
.clearfix {
    *zoom:1;
}

common.css:

/* 声明字体图标 这里要注意路径变化 */
@font-face {
    font-family: 'icomoon';
    src:  url('../fonts/icomoon.eot?lx66hn');
    src:  url('../fonts/icomoon.eot?lx66hn#iefix') format('embedded-opentype'),
      url('../fonts/icomoon.ttf?lx66hn') format('truetype'),
      url('../fonts/icomoon.woff?lx66hn') format('woff'),
      url('../fonts/icomoon.svg?lx66hn#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
  }
/* 版心 */
.w {
    width: 1200px;
    margin: 0 auto;
}
.fl {
    float: left;
}
.fr {
    float: right;
}
.style_red {
    color: #c81623;
}
/* 快捷导航模块 */
.shortcut {
    height: 31px;
    line-height: 31px;
    background-color: #f1f1f1;
}
.shortcut ul li {
    float: left;
}
/* 选择所有的偶数li */
.shortcut .fr ul li:nth-child(even)  {
    width: 1px;
    height: 12px;
          /* 上 左右 下 */
    margin: 9px 15px 0;
    background-color: #666;
}
.arrow-icon::after {
    content: '\e91e';
    font-family: 'icomoon';
    margin-left: 6px;
}
/* 整个header头部模块 */
.header {
    position: relative;
    /* 这个是它本来的值,我的是因为没有品优的图片文档,就直接截图
    所以有一些值是不一样的,还请见谅,不过一不一样关系不大,会就好
    啦 height: 105px; */
    height: 125px;
}
/* header中的logo部分 */
.logo {
    position: absolute;
    top: 25px;
    /* width: 171px; */
    width: 272px;
    /* height: 61px; */
    height: 86px;
}
.logo a {
    display: block;
    width: 171px;
    height: 61px;
    /* background: url(../样式类图片文件夹(image)/logo.png) no-repeat; */
    /* 京东做法 */
    font-size: 0;
    /* 淘宝做法 */
    /* text-indent: -999px;
    overflow: hidden; */
}
/* 搜索模块 */
.search {
    position: absolute;
    top: 25px;
    left: 346px;
    width: 538px;
    height: 36px;
    border: 2px solid #b1191a;
}
.search input {
    float: left;
    height: 32px;
    width: 454px;
    padding-left: 10px;
}
.search button {
    float: left;
    height: 32px;
    width: 80px;
    font-size: 16px;
    color: #fff;
    background-color: #b1191a;
}
/* hotwords模块 */
.hotwords {
    position: absolute;
    top: 66px;
    left: 346px;
}
.hotwords a {
    margin: 0 10px;
}
.shopcar {
    position: absolute;
    top: 25px;
    right: 60px;
    height: 35px;
    /* 字体垂直居中 */
    line-height: 35px;
    text-align: 35px;
    border: 1px solid #dfdfdf;
    background-color: #f7f7f7;
}
.shopcar::before {
    content: '\e920';
    font-family: 'icomoon';
    margin-left: 5px;
    color: #b1191a;
}
.shopcar::after {
    content: '\e93a';
    font-family: 'icomoon';
    margin-left: 10px;
}
.count {
    position: absolute;
    top: -5px;
    left: 105px;
    height: 14px;
    line-height: 14px;
    color: #fff;
    background-color: #e60012;
    padding: 0 5px;
    border-radius: 7px 7px 7px 0;
}
/* nav模块制作 */
.nav {
    height: 47px;
    border-bottom: 2px solid #b1191a;
}
.nav .dropdown {
    float: left;
    width: 210px;
    height: 45px;
    background-color: #b1191a;
}
.nav .navitems {
    float: left;
}
.dropdown .dt {
    width: 100%;
    height: 100%;
    color: #fff;
    line-height: 45px;
    text-align: center;
    font-size: 16px;
}
.dropdown .dd {
    height: 465px;
    width: 210px;
    background-color: #c81623;
    margin-top: 2px;
}
.dropdown .dd ul li {
    position: relative;
    height: 31px;
    line-height: 31px;
    margin-left: 2px;
    padding-left: 10px;
}
.dropdown .dd ul li::after {
    position: absolute;
    top: 1px;
    right: 10px;
    font-family: 'icomoon';
    content: '\e90b';
    color: #fff;
    font-size: 14px;
}
.dropdown .dd ul li a {
    font-size: 14px;
    color: #fff;
}
.dropdown .dd ul li:hover {
    background-color: #fff;
}
.dropdown .dd ul li:hover a {
    color: #c81623;
}
.navitems ul li {
    float: left;
}
.navitems ul li a {
    display: block;
    height: 47px;
    line-height: 47px;
    font-size: 16px;
    padding: 0 25px;
}
/* 底部模块的制作 */
.footer {
    float: left;
    height: 415px;
    background-color: #f5f5f5;
    margin-top: 30px;
}
.mod_service {
    height: 120px;
    border-bottom: 1px solid #ccc;
}
.mod_service ul li {
    float: left;
    width: 300px;
    height: 50px;
    margin-top: 35px;
    padding-left: 35px;
}
.footer .mod_service ul li h5 {
    float: left;
    height: 66px;
    width: 64px;
    margin-right: 8px;
    margin-top: -14px;
    border-radius: 13px 13px 39% 39%;
    background: url(../样式类图片文件夹(image)/图标.jpg) no-repeat -982px -247px;
}
.service_txt h4 {
    font-size: 14px;
}
.service_txt p {
    font-size: 12px;
}
.mod_help {
    height: 185px;
    padding: 35px;
    border-bottom: 1px solid #ccc;
}
.mod_help dl {
    float: left;
    width: 200px;
}
.mod_help dl:last-child {
    float: left;
    width: 90px;
    margin-top: 6px;
    text-align: center;
}
.mod_help dl dt {
    font-size: 16px;
    margin-bottom: 10px;
}
.mod_help dl dd {
    font-size: 12px;
}
.mod_copyright {
    text-align: center;
    margin-top: 20px;
}
.mod_copyright .links {
    margin-bottom: 15px;
    line-height: 2px;
}

 

list.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>列表页-正品低价、品质保障、配送及时、轻松购物!</title>
    <!-- 网站说明 -->
    <meta name="description" content="品优购商城-专业的综合网上购物商城,为您提供正品低价的购物选择、优质便捷的服务体验。商品来自全球数十万品牌商家,囊括家电、手机、电脑、服装、居家、母婴、美妆、个护、食品、生鲜等丰富品类,满足各种购物需求。"/>
    <!-- 关键字 -->
    <meta name="Keywords" content="网上购物,网上商城,家电,手机,电脑,服装,居家,母婴,美妆,个护,食品,生鲜,品优购商城"/>
    <!-- favicon图标引入 -->
    <link rel="shortcut icon" href="favicon.ico" type="images/x-icon"/>
    <!-- 初始化样式 -->
    <link rel="stylesheet" href="css/base.css">
    <!-- 公共样式 -->
    <link rel="stylesheet" href="css/common.css">
    <!-- 引入列表页的css文件 -->
    <link rel="stylesheet" href="css/list.css">
</head>
<body>
    <!-- header头部模块 -->
    <header class="header w">
        <!-- logo部分 -->
     <div class="logo">
        <h1>
            <a href="index.html" title="品优购商城"> <img src="样式类图片文件夹(image)/logo.png" alt=""     width="171px"  height="61px">品优购商城</a>
        </h1>
     </div>
     <!-- 列表页的秒杀模式 -->
     <div class="sk">
        <img src="样式类图片文件夹(image)/b1.jpg" alt="" width="65px" height="30px">
     </div>
     <!-- 搜索模块 -->
     <div class="search">
        <input type="search" name="" id="" placeholder="语言开发">
        <button>搜索</button>
     </div>
     <!-- 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>
     <!-- 购物车模块 -->
     <div class="shopcar">
        我的购物车
        <i class="count">8</i>
     </div>
    </header>
    <!-- nav模块制作 -->
    <div class="nav">
        <div class="w">
            <div class="sk_list">
                <ul>
                    <li><a href="#">品优秒杀</a></li>
                    <li><a href="#">即将售罄</a></li>
                    <li><a href="#">超值低价</a></li>
                </ul>
            </div>
            <div class="sk_con">
                <ul>
                    <li><a href="#">女装 </a></li>
                    <li><a href="#" class="style_red">女鞋</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>
    </div>
    <!-- 列表页主体部分 -->
    <div class="w sk_container">
        <div class="sk_hd">
            <img src="样式类图片文件夹(image)/b2.jpg" alt="" width="1200px">
        </div>
        <div class="sk_bd">
            <ul class="clearfix">
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>
                <li><img src="样式类图片文件夹(image)/b3.jpg" alt="" width="290px" height="460px"></li>                
            </ul>
        </div>
    </div>
    <!-- 底部模块的制作 -->
    <div class="w">
    <footer class="footer">
            <div class="mod_service">
                <ul>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>正品保障</h4>
                            <p>正品保障,提供发票</p>
                        </div>
                    </li>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>极速物流</h4>
                            <p>急速物流,急速送达</p>
                        </div>
                    </li>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>无忧售后</h4>
                            <p>7天无理由退换货</p>
                        </div>
                    </li>
                    <li>
                        <h5></h5>
                        <div class="service_txt">
                            <h4>特色服务</h4>
                            <p>私人定制家电套餐</p>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="mod_help">
                <dl>
                    <dt>服务指南</dt>
                    <dd><a href="#">购物流程</a></dd>
                    <dd><a href="#">会员介绍</a></dd>
                    <dd><a href="#">生活旅行/团购</a></dd>
                    <dd><a href="#">常见问题</a></dd>
                    <dd><a href="#">大家电</a></dd>
                    <dd><a href="#">联系客服</a></dd>
                </dl>
                <dl>
                    <dt>配送方式</dt>
                    <dd><a href="#">上门自提</a></dd>
                    <dd><a href="#">211限时达</a></dd>
                    <dd><a href="#">配送服务查询</a></dd>
                    <dd><a href="#">配送费收取标准</a></dd>
                    <dd><a href="#">海外配送</a></dd>
                </dl>
                <dl>
                    <dt>支付方式</dt>
                    <dd><a href="#">货到付款</a></dd>
                    <dd><a href="#">在线支付</a></dd>
                    <dd><a href="#">分期付款</a></dd>
                    <dd><a href="#">邮局汇款</a></dd>
                    <dd><a href="#">公司转账</a></dd>
                    <dd><a href="#"></a></dd>
                </dl>
                <dl>
                    <dt>售后服务</dt>
                    <dd><a href="#">售后政策</a></dd>
                    <dd><a href="#">价格保护</a></dd>
                    <dd><a href="#">退款说明</a></dd>
                    <dd><a href="#">返修/退换货</a></dd>
                    <dd><a href="#">取消订单</a></dd>
                    <dd><a href="#"></a></dd>
                </dl>
                <dl>
                    <dt>特色服务</dt>
                    <dd><a href="#">夺宝岛</a></dd>
                    <dd><a href="#">DIY装机</a></dd>
                    <dd><a href="#">延保服务</a></dd>
                    <dd><a href="#">品优购E卡</a></dd>
                    <dd><a href="#">品优购通信</a></dd>
                    <dd><a href="#"></a></dd>
                </dl>
                <dl>
                    <dt>帮助中心</dt>
                    <dd>
                        <img src="样式类图片文件夹(image)/二维码.jpg" alt="" width="80px" height="80">品优购客户端
                    </dd>
                </dl>
            </div>
            <div class="mod_copyright">
                <div class="links">
                    <ul>
                        <a href="#">关于我们</a>|<a href="#">联系我们</a>|<a href="#">联系客服</a>|<a href="#">商家入驻</a>|
                        <a href="#">营销中心</a>|<a href="#">手机品优购</a>|<a href="#">友情链接</a>|<a href="#">销售联盟</a>|
                        <a href="#">品优购社区</a>|<a href="#">品优购公益</a>|<a href="#">English Site</a>|<a href="#">Contact U</a>
                    </ul>
                </div>
                <div class="copyright">
                    地址:北京市昌平区建材城西路金燕龙办公楼一层 
                    邮编:100096 电话:400-618-4000 传真:010-82935100 
                    邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                </div>
            </div>
        </div>
    </footer>  
</body>
</html>

list.css

/* 列表页专业的css样式 */
.nav {
    overflow: hidden;
}
.sk {
    position: absolute;
    left: 190px;
    top: 40px;
    border-left: 1px solid #c81523;
    padding: 3px 0 0 14px;
}
.sk {
    position: absolute;
    left: 190px;
    top: 40px;
    padding: 3px 0 0 14px;
}
.sk_list {
    float: left;
}
.sk_list ul li {
    float: left;
}
.sk_list ul li a {
    display: block;
    line-height: 47px;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 700;
    color: #000;
}
.sk_con {
    float: left;
}
.sk_con ul li {
    float: left;
}
.sk_con ul li a {
    display: block;
    line-height: 49px;
    padding: 0 20px;
    font-size: 14px;
}
.sk_con ul li:last-child a::after {
    content: '\e908';
    font-family: icomoon;
}
/* 列表页主体部分 */
.sk_bd {
    margin-bottom: 283px;
}
.sk_bd ul li {
    float: left;
    overflow: hidden;
    width: 290px;
    height: 460px;
    margin-right: 13px;
    /* 小li本身有边框 */
    border: 1px solid transparent;
}
.sk_bd ul li:nth-child(4n) {
    margin-right: 0;
}
.sk_bd ul li:hover {
    border: 1px solid #c81523;
}
.sk_bd ul li p {
    margin-left: 12px;
    font-size: 14px;
    color: #666;
}
.sk_bd ul li .price {
    position: relative;
    margin-left: 12px;
}
.sk_bd ul li .price h3 {
    margin-top: 5px;
    font-size: 22px;
    color: #e60012;
}
.sk_bd ul li .price h4 {
    position: absolute;
    left: 75px;
    top: 8px;
    font-size: 14px;
    color: #a4a4a4;
    text-decoration: line-through;
}
.sk_bd ul li .yishou {
    height: 15px;
    font-size: 14px;
    line-height: 24px;
    padding-bottom: 0;
    margin-left: 12px;
}
.sk_bd ul li .yishou i {
    display: block;
    height: 10px;
    width: 116px;
    border-radius: 6px 0 0 6px;
    margin-left: 10px;
    border: 1px solid #ed282e;
    background-color: #ed282e;
}
.sk_bd ul li .yishou div {
    display: block;
    height: 10px;
    width: 16px;
    border-radius: 0 6px 6px 0;
    border: 1px solid #fff;
    margin-left: -10px;
    margin-right: 10px;
}
.sk_bd ul li .yishou p {
    display: inline;
    font-size: 14px;
    margin-left: 0;
    color: #ed282e;
}

.sk_bd ul li .qianguo a {
    display: block;
    height: 50px;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    color: #fff;
    background-color: #ed282e;
    margin-top: 25px;
}

 

register.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人注册</title>
    <!-- favicon图标引入 -->
    <link rel="shortcut icon" href="favicon.ico" type="images/x-icon"/>
    <!-- 初始化样式 -->
    <link rel="stylesheet" href="css/base.css">
    <!-- 引入个人注册的css -->
    <link rel="stylesheet" href="css/register.css">
</head>
<body>
    <div class="w">
        <header>
            <div class="logo">
                <a href="index.html"><img src="样式类图片文件夹(image)/logo.png" alt=""     width="171px"  height="61px"></a>
             </div>
        </header>
        <div class="registerarea">
            <h3>注册新用户
                <div class="login">我有账号,去<a href="#">登陆</a></div>
            </h3>
            <div class="reg_form">
                <form action="">
                    <ul>
                        <li><label for="">手机号:</label><input type="text" name="" id="" class="inp">
                            <span class="error"> <i class="error_icon">
                                <img src="样式类图片文件夹(image)/c1.jpg" alt="" width="20px" height="20px">
                            </i> 手机号码格式不正确,请重新输入</span></li>
                        <li><label for="">短信验证码:</label><input type="text" name="" id="" class="inp">
                            <span class="success"> <i class="success_icon">
                                <img src="样式类图片文件夹(image)/c2.jpg" alt="" width="20px" height="20px">
                            </i> 短信验证码输入正确</span></li>
                        <li><label for="">登录密码:</label><input type="password" name="" id="" class="inp">
                            <span class="error"> <i class="error_icon">
                                <img src="样式类图片文件夹(image)/c1.jpg" alt="" width="20px" height="20px">
                            </i> 手机号码格式不正确,请重新输入</span></li>
                        <li class="safe">安全程度 <em class="ruo">弱</em> <em class="zhong">中</em> <em class="qiang">强</em></li>
                        <li><label for="">确认密码:</label><input type="password" name="" id="" class="inp">
                            <span class="error"> <i class="error_icon">
                                <img src="样式类图片文件夹(image)/c1.jpg" alt="" width="20px" height="20px">
                            </i> 手机号码格式不正确,请重新输入</span></li>
                        <li class="agree"><input type="checkbox" name="" id=""> 
                            同意协议并注册 <a href="#">《知晓用户协议》</a>
                        </li>
                        <li>
                            <input type="submit" value="完成注册" class="btn">
                        </li>
                    </ul>
                </form>
            </div>
        </div>
        <footer>
            <div class="mod_copyright">
                <div class="links">
                    <ul>
                        <a href="#">关于我们</a>|<a href="#">联系我们</a>|<a href="#">联系客服</a>|<a href="#">商家入驻</a>|
                        <a href="#">营销中心</a>|<a href="#">手机品优购</a>|<a href="#">友情链接</a>|<a href="#">销售联盟</a>|
                        <a href="#">品优购社区</a>|<a href="#">品优购公益</a>|<a href="#">English Site</a>|<a href="#">Contact U</a>
                    </ul>
                </div>
                <div class="copyright">
                    地址:北京市昌平区建材城西路金燕龙办公楼一层 
                    邮编:100096 电话:400-618-4000 传真:010-82935100 
                    邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                </div>
            </div>
        </footer>
    </div>
</body>
</html>

register.css:

.w {
    width: 1200px;
    margin: 0 auto;
}
header {
    height: 84px;
    border-bottom: 2px solid #c81523;
}
.logo {
    padding-top: 18px;
}
.registerarea {
    height: 522px;
    border: 1px solid #ccc;
    margin-top: 20px;
}
.registerarea h3 {
    height: 42px;
    border-bottom: 1px solid #ccc;
    background-color: #ececec;
    line-height: 42px;
    padding: 0 10px;
    font-size: 18px;
    font-weight: 400;
}
.login {
    float: right;
    font-size: 14px;
}
.login a {
    color: #c81523;
}
.reg_form {
    width: 600px;
    margin: 50px auto 0;
}
.reg_form ul li {
    margin-bottom: 20px;
}
.reg_form ul li label {
    display: inline-block;
    width: 88px;
    text-align: right;
}
.reg_form ul li .inp {
    width: 242px;
    height: 37px;
    border: 1px solid #ccc;
}
.error {
    padding-left: 10px;
    color: #c81523;
}
.error_icon img,
.success_icon img  {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    margin-top: -2px;
    border-radius: 100px ;
}
.success {
    padding-left: 10px;
    color: green;
}
.safe {
    padding-left: 175px;
}
.safe em{
    padding: 0 12px;
    color: #fff;
}
.ruo {
     background-color: #de1111;
}
.zhong {
    background-color: #40b83f;
}
.qiang {
    background-color: #f79100;
}
.agree {
    padding-left: 95px;
}
.agree input {
    vertical-align: middle;
}
.agree a {
    color: #1ba1e6;
}
.btn {
    width: 200px;
    height: 34px;
    background-color: #c81623;
    font-size: 14px;
    color: #fff;
    margin: 30px 0 0 70px;
}
.mod_copyright {
    text-align: center;
    margin-top: 20px;
}
.mod_copyright .links {
    margin-bottom: 15px;
    line-height: 2px;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
个人网页是指一个个人展示自己信息和作品的网站,通常用来展示个人的专业技能、工作经历、项目经验、个人作品等内容。对于web前端作业的个人网页来说,一般需要考虑以下几个方面。 首先,设计界面。一个好的个人网页需要有清晰、美观的界面设计,包括网页的布局、颜色搭配、字体选择等。界面设计要符合个人风格,并且要注重用户体验,保证用户能够方便地浏览信息。 其次,编写网页代码。作为web前端作业,个人网页需要用HTMLCSS和JavaScript等前端技术来编写。通过合理的标签和样式设置,来实现网页的各种功能,包括导航栏、轮播图、响应式布局等。 另外,需要考虑网页的信息展示。个人网页的目的是展示个人信息和作品,因此需要合理地组织内容,包括个人简介、技能展示、工作经历、项目经验、作品展示等。可以通过分块、分类和标签等方式使信息更易于理解和浏览,同时也可以增加交互效果,使网页更具吸引力。 最后,要保证个人网页的兼容性和性能。考虑到不同浏览器和设备的差异,需要进行浏览器兼容性测试,以确保网页在各种环境下良好运行。同时还要考虑网页加载速度,尽量减少文件大小和请求次数,提高网页性能。 综上所述,web前端作业的个人网页是一个展示个人信息和作品的网站,需要考虑界面设计、编写网页代码、信息展示和兼容性性能等方面。通过合理的设计和编写,打造一个令人满意的个人网页。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值