品优购网页制作(HTML和css内容)

品优购

  • 前期准备
  • 书写对应页面
    • 首页
    • 列表页
    • 注册页
  • 后话

前期准备

1.准备一个大的文件夹,里面包括若干小的文件夹。
2.小的文件夹分为:
css-----存储初始化样式以及各个页面的样式
images----存储不易更换的图片
upload----存储经常更换的图片
icomoon----字体图标相关文件
fonts----icomoon中的fonts移过来就行
3.再准备好网络名称左边的小图标
4.可以开始了
注:需要的品优购网页练习资源的可以关注下博主,私发。

书写对应页面

首页

由于于首页的导航栏、头部、尾部是公共样式,其他页面也可以使用,所以在这里我们写一个公共的css样式,然后引入;等到写完公共部分内容,我们在写一个首页的样式,一般命名为 index.css 。除此之外,为了让更多的人看到我们的网页,我们还需要进行三大标签SEO优化,具体见代码块。
具体代码如下:

 
 
<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="网上购物,网上商城,手机,笔记本,电脑,MP3,CD">
    
    <link rel="shortcut icon" href="favicon.ico" />
    
    <link rel="stylesheet" href="css/base.css">
    
    <link rel="stylesheet" href="css/common.css">
    
    <link rel="stylesheet" href="css/index.css">
head>

<body>
    
    <section class="shortcut">
        <div class="w">
            <div class="fl">
                <ul>
                    <li>品游购欢迎您! li>
                    <li>
                        <a href="#">请登录 a><a href="register.html" class="style_red">免费注册a>
                    li>
                ul>
            div>
            <div class="fr">
                <ul>
                    <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 class="header w">
        
        <div class="logo">
            <h1>
                <a href="index.html" title="品优购商城">品优购商城a>
            h1>
        div>
        
        <div class="search">
            <input type="search" name="" id="" placeholder="语言开发">
            <button>搜索button>
        div>
        
        <div class="hotwords">
            <a href="#" class="style_red">优惠购首发a>
            <a href="#">亿元优惠a>
            <a href="#">9.9团购a>
            <a href="#">美团99减30a>
            <a href="#">办公用品a>
            <a href="#">电脑a>
            <a href="#">通信a>
        div>
        <div class="shopcar">
            我的购物车
            <i class="count">8i>
        div>
    header>
    
    
    <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>
    
    
    <div class="w">
        <div class="main">
            <div class="focus">
                <ul>
                    <li><img src="upload/focus1.png" alt="">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>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>
                <div class="bargain">
                    <img src="upload/bargain.png" alt="">
                div>
            div>
        div>
    div>
    
    
    <div class="w recom">
        <div class="recom_hd">
            <img src="images/recom.png" alt="">
        div>
        <div class="recom_bd">
            <ul>
                <li><img src="upload/recom_03.jpg" alt="">li>
                <li><img src="upload/recom_03.jpg" alt="">li>
                <li><img src="upload/recom_03.jpg" alt="">li>
                <li><img src="upload/recom_03.jpg" alt="">li>
            ul>
        div>
    div>
    
    
    <div class="w favorite">
        <div class="favorite_hd">
            <h5>猜你喜欢h5>
            <i><a href="#">换一批a>i>
        div>
        <div class="favorite_bd">
            <ul>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
            ul>
        div>
    div>
    
    
    <div class="w transmit">
        传智播客 · 有趣区
    div>
    <div class="transmit_bd w">
        <div class="transmit_bd-1">
            <img src="upload/images/images/images/.trans1_07.jpg" alt="">
        div>
        <div class="transmit_bd-2">
            <img src="upload/images/images/images/trans2_07.jpg" alt="">
        div>
        <div class="transmit_bd-3">
            <img src="upload/images/images/images/trans3_07.jpg" alt="">
        div>
        <div class="transmit_bd-4">
            <img src="upload/a136.jpg" alt="">
        div>
    div>
    
    
    <div class="floor">
        
        <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="upload/floor-1-1.png" alt="">
                            a>
                        div>
                        <div class="col_329">
                            <a href="#">
                                <img src="upload/floor-1-b01.png" alt="">
                            a>
                        div>
                        <div class="col_221">
                            <a href="#" class="bb">
                                <img src="upload/floor-1-2.png" alt="">
                            a>
                            <a href="#">
                                <img src="upload/floor-1-3.png" alt="">
                            a>
                        div>
                        <div class="col_221">
                            <a href="#">
                                <img src="upload/floor-1-4.png" class="h_73" alt="">
                            a>
                        div>
                        <div class="col_219">
                            <a href="#" class="bb">
                                <img src="upload/floor-1-5.png" alt="">
                            a>
                            <a href="#">
                                <img src="upload/floor-1-6.png" alt="">
                            a>
                        div>
                    div>
                div>
            div>
        div>
        
        
        <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="upload/floor-1-1.png" alt="">
                            a>
                        div>
                        <div class="col_329">
                            <a href="#">
                                <img src="upload/floor-1-b01.png" alt="">
                            a>
                        div>
                        <div class="col_221">
                            <a href="#" class="bb">
                                <img src="upload/floor-1-2.png" alt="">
                            a>
                            <a href="#">
                                <img src="upload/floor-1-3.png" alt="">
                            a>
                        div>
                        <div class="col_221">
                            <a href="#">
                                <img src="upload/floor-1-4.png" class="h_73" alt="">
                            a>
                        div>
                        <div class="col_219">
                            <a href="#" class="bb">
                                <img src="upload/floor-1-5.png" alt="">
                            a>
                            <a href="#">
                                <img src="upload/floor-1-6.png" alt="">
                            a>
                        div>
                    div>
                div>
            div>
        div>
        
        
        <div class="w diannao">
            <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="upload/floor-1-1.png" alt="">
                            a>
                        div>
                        <div class="col_329">
                            <a href="#">
                                <img src="upload/floor-1-b01.png" alt="">
                            a>
                        div>
                        <div class="col_221">
                            <a href="#" class="bb">
                                <img src="upload/floor-1-2.png" alt="">
                            a>
                            <a href="#">
                                <img src="upload/floor-1-3.png" alt="">
                            a>
                        div>
                        <div class="col_221">
                            <a href="#">
                                <img src="upload/floor-1-4.png" class="h_73" alt="">
                            a>
                        div>
                        <div class="col_219">
                            <a href="#" class="bb">
                                <img src="upload/floor-1-5.png" alt="">
                            a>
                            <a href="#">
                                <img src="upload/floor-1-6.png" alt="">
                            a>
                        div>
                    div>
                div>
            div>
        div>
        

    div>
    
    
    <div class="w favorite">
        <div class="favorite_hd">
            <h5>热门疯抢h5>
        div>
        <div class="favorite_bd">
            <ul>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
                <li>
                    <img src="upload/.fav.png" alt="">
                    <p>阳光美包新款单肩包女<br>
                        包时尚子母包四件套女p>
                    <h4>¥116.00h4>
                li>
            ul>
        div>
    div>
    
    
    <footer class="footer">
        <div class="w">
            <div class="mod_service">
                <ul>
                    <li>
                        <h5 class="i1">h5>
                        <div class="service_txt">
                            <h4>正品保障h4>
                            <p>正品保障,提供发票p>
                        div>
                    li>
                    <li>
                        <h5 class="i2">h5>
                        <div class="service_txt">
                            <h4>极速物流h4>
                            <p>急速物流,急速送达p>
                        div>
                    li>
                    <li>
                        <h5 class="i3">h5>
                        <div class="service_txt">
                            <h4>无忧售后h4>
                            <p>7天无理由退换货p>
                        div>
                    li>
                    <li>
                        <h5 class="i4">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="images/wx_cz.jpg" alt="">品优购客户端
                    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 Sitea>|<a href="#">Contact
                            Ua>
                    ul>

                div>
                <div class="copyright">
                    地址:北京市昌平区建材城西路金燕龙办公楼一层 邮编:100096 电话:400-618-4000 传真:010-82935100 邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                div>
            div>
        div>

    footer>
    
body>

html>

对应的css样式:
初始化css:

/* 把所有标签的内外边距清零 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* em 和 i 斜体的文字不倾斜 */
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 {
    /* "\5B8B\4F53" 就是宋体的意思 这样浏览器兼容性比较好 */
    font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
    border: 0;
    outline: none;
}

body {
    /* CSS3 抗锯齿形 让文字显示的更加清晰 */
    -webkit-font-smoothing: antialiased;
    background-color: #fff;
    font: 12px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
    color: #666;
}

.hide,
.none {
    display: none
}
/* 清除浮动 */
.clearfix:after {
    visibility: hidden;
    clear: both;
    display: block;
    content: ".";
    height: 0;
}

.clearfix {
    *zoom: 1;
}

公共样式:

/* 声明字体图标 这里要注意路径变化*/
@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;
}
.shortcut .fr ul li:nth-child(even) {
    width: 1px;
    height: 12px;
    background-color: #666;
    margin: 9px 15px 0;
}
.arow-icon::after {
    font-family: 'icomoon';
    content: '\e908';
    margin-left: 6px;
}
/* header头部模块 */
.header {
    position: relative;
    height: 105px;
}
.logo {
    position: absolute;
    top: 25px;
    width: 171px;
    height: 61px;
}
.logo a {
    display: block;
    width: 175px;
    height: 61px;
    background: url(../images/logo.png) no-repeat;
    /* font-size: 0; 京东的做法 */
    /* 淘宝的做法 */
    text-indent: -9999px;
    overflow: hidden;
}
.search {
    position: absolute;
    left: 346px;
    top: 25px;
    width: 538px;
    height: 36px;
    border: 2px solid #b1191a;
}
.search input {
    float: left;
    width: 454px;
    height: 32px;
    padding-left: 10px;
}
.search button {
    float: left;
    width: 80px;
    height: 32px;
    background-color: #b1191a;
    font-size: 16px;
    color: #ffffff;
}
.hotwords {
    position: absolute;
    top: 66px;
    left: 346px;
}
.hotwords a {
    margin: 0 10px;
}
.shopcar {
    position: absolute;
    top: 25px;
    right: 60px;
    width: 140px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border: 1px solid #dfdfdf;
    background-color: #f7f7f7;
}
.shopcar::before {
    content: '\e93a';
    font-family: 'icomoon';
    color: #b1191a;
    margin-right: 3px;
}
.shopcar::after {
    content: '\e90b';
    font-family: 'icomoon';
    margin-left: 8px;
}
.count {
    position: absolute;
    left: 105px;
    top: -5px;
    height: 14px;
    line-height: 14px;
    color: #fff;
    padding: 0 5px;
    border-radius: 7px 7px 7px 0;
    background-color: #e60012;
}
/* nav模块制作 */
.nav {
    height: 47px;
    border-bottom: 2px solid #b1191a;
}
.nav .dropdown {
    float: left;
    width: 210px;
    height: 47px;
    background-color: #b1191a;
}
.nav .navitems {
    float: left;
}
.dropdown .dt {
    width: 100%;
    height: 100%;
    color: #fff;
    text-align: center;
    line-height: 47px;
    font-size: 16px;
}
.dropdown .dd {
    width: 210px;
    height: 465px;
    background-color: #c81623;
}
.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 {
    height: 415px;
    background-color: #f5f5f5;
    padding-top: 35px;
}
.mod_service {
    height: 80px;
    border-bottom: 1px solid #ccc;
}
.mod_service ul li {
    float: left;
    width: 300px;
    height: 50px;
    padding-left: 35px;
}
.mod_service ul li h5 {
    float: left;
    height: 50px;
    width: 50px;
    margin-right: 8px;
}
.mod_service ul li .i1 {
    background: url(../images/icons.png) no-repeat -252px -2px;
}
.mod_service ul li .i2 {
    background: url(../images/icons.png) no-repeat -255px -53px;
}
.mod_service ul li .i3 {
    background: url(../images/icons.png) no-repeat -257px -106px;
}
.mod_service ul li .i4 {
    background: url(../images/icons.png) no-repeat -257px -157px;
}
.service_txt h4 {
    font-size: 14px;
}
.service_txt p {
    font-size: 12px;
}
.mod_help {
    height: 185px;
    border-bottom: 1px solid #ccc;
    padding-top: 20px;
    padding-left: 50px;
}
.mod_help dl {
    float: left;
    width: 200px;
}
.mod_help dl:last-child {
    width: 90px;
    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;
    padding-top: 20px;
}
.mod_copyright .links {
    margin-bottom: 15px;
}
.mod_copyright .copyright {
    line-height: 20px;
}
.links a {
    margin: 0 16px;
}

首页样式:

/* 首页专有模块 */
.main {
    width: 980px;
    height: 455px;
    background-color: #fff;
    margin-left: 220px;
    margin-top: 10px;
}
.main .focus {
    float: left;
    width: 721px;
    height: 455px;
    background-color: blue;
}
.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;
    background-color: pink;
    margin-top: 12px;
    background: url(../images/icons.png) no-repeat -19px -15px;
}
.bargain {
    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;
}
/* 猜你喜欢模块 */
.favorite {
    height: 290px;
}
.favorite_hd {
    height: 58px;
    background-color: #fff;
}
.favorite_hd h5 {
    float: left;
    font-size: 18px;
    margin-top: 29px;
    font-weight: 400;
    color: #5d5d5d;
}
.favorite_hd i {
    float: right;
    margin-right: 21px;
    margin-top: 36px;
    font-size: 12px;
}
.favorite_hd i::after {
    content: '\e913';
    font-family: 'icomoon';
}
.favorite_bd {
    overflow: hidden;
    width: 1200px;
    height: 232px;
    border: 1px solid #e4e4e4;
}
.favorite_bd ul {
    width: 1210px;
}
.favorite_bd ul li {
    position: relative;
    float: left;
    width: 200px;
    height: 232px;
    background-color: #fff;
}
.favorite_bd ul li img {
    margin: 0 14px;
}
.favorite_bd ul li p {  
    margin-top: 15px;
    margin-left: 36px;
    font-size: 12px;
}
.favorite_bd ul li h4 {
    margin-bottom: 8px;
    margin-left: 36px;
    font-size: 18px;
    color: #df3033;
}
.favorite_bd ul li:nth-child(-n+5)::after {
    content: '';
    position: absolute;
    top: 160px;
    right: 0;
    width: 1px;
    height: 55px;
    background-color: #ddd;
}
/* 传智播客 有趣区 */
.transmit {
    overflow: hidden;
    height: 59px;
    padding-top: 30px;
    font-size: 18px;
    color: #333;
}
.transmit_bd {
    width: 1210px;
    height: 405px;  
    border: 1px solid #ededed;
}
.transmit_bd .transmit_bd-1 {
    float: left;
    width: 404px;
    height: 405px;
    border-right: 1px solid #ededed;
}
.transmit_bd .transmit_bd-2 {
    float: left;
    width: 228px;
    height: 405px;
    border-right: 1px solid #ededed;
}
.transmit_bd .transmit_bd-3 {
    float: left;
    width: 404px;
    height: 405px;
    border-right: 1px solid #ededed;
}
.transmit_bd .transmit_bd-3 {
    float: left;
}
/* 家用电器模块 */
.box_hd {
    height: 30px;
    border-bottom: 2px solid #c81623;
}
.box_hd h3 {
    float: left;   
    font-size: 18px;
    font-weight: normal;
    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 {
    margin-left: 12px;
}
.col_210 a img{
    margin-top: 26px;
}
.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;
}

列表页

引入公共样式,编写特殊样式:
列表页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="网上购物,网上商城,手机,笔记本,电脑,MP3,CD">
    
    <link rel="shortcut icon" href="favicon.ico" />
    
    <link rel="stylesheet" href="css/base.css">
    
    <link rel="stylesheet" href="css/common.css">
    
    <link rel="stylesheet" href="css/list.css">
head>

<body>
    
    <section class="shortcut">
        <div class="w">
            <div class="fl">
                <ul>
                    <li>品游购欢迎您! li>
                    <li>
                        <a href="#">请登录 a><a href="register.html" class="style_red">免费注册a>
                    li>
                ul>
            div>
            <div class="fr">
                <ul>
                    <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 class="header w">
        
        <div class="logo">
            <h1>
                <a href="index.html" title="品优购商城">品优购商城a>
            h1>
        div>
        
        <div class="sk">
            <img src="images/sk.png" alt="">
        div>
        
        
        <div class="search">
            <input type="search" name="" id="" placeholder="语言开发">
            <button>搜索button>
        div>
        
        <div class="hotwords">
            <a href="#" class="style_red">优惠购首发a>
            <a href="#">亿元优惠a>
            <a href="#">9.9团购a>
            <a href="#">美团99减30a>
            <a href="#">办公用品a>
            <a href="#">电脑a>
            <a href="#">通信a>
        div>
        <div class="shopcar">
            我的购物车
            <i class="count">8i>
        div>
    header>
    
    
    <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_content">
                <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="upload/bg_03.png" alt="">
        div>
        <div class="sk_bd clearfix">
            <ul>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>
                <li>
                    <img src="upload/a7.jpg" alt="">
                    <p>Apple苹果iPhone 6s Plus(A1699)32G 金色 移动联通电信4G手机p>
                    <div class="price">
                        <h3>¥6088h3>
                        <h4>¥6988h4>
                    div>
                    <div class="yishou">
                        已售87%
                        <i>i>
                        <div>div>
                        剩余<p>29p>div>
                    <div class="qianggou">
                        <a href="#">立即抢购a>
                    div>
                li>

            ul>
        div>
    div>
    <div class="w">div>
    
    
    <footer class="footer">
        <div class="w">
            <div class="mod_service">
                <ul>
                    <li>
                        <h5 class="i1">h5>
                        <div class="service_txt">
                            <h4>正品保障h4>
                            <p>正品保障,提供发票p>
                        div>
                    li>
                    <li>
                        <h5 class="i2">h5>
                        <div class="service_txt">
                            <h4>极速物流h4>
                            <p>急速物流,急速送达p>
                        div>
                    li>
                    <li>
                        <h5 class="i3">h5>
                        <div class="service_txt">
                            <h4>无忧售后h4>
                            <p>7天无理由退换货p>
                        div>
                    li>
                    <li>
                        <h5 class="i4">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="images/wx_cz.jpg" alt="">品优购客户端
                    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 Sitea>|<a href="#">Contact
                            Ua>
                    ul>
                div>
                <div class="copyright">
                    地址:北京市昌平区建材城西路金燕龙办公楼一层 邮编:100096 电话:400-618-4000 传真:010-82935100 邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                div>
            div>
        div>

    footer>
    
body>

html>

对应css样式:

/* 列表页专有的css样式 */
.nav {
    overflow: hidden;
}
.sk {
    position: absolute;
    left: 190px;
    top: 40px;
    padding: 3px 0 0 14px;
}
.sk_list {
    float: left;
}
.sk_list ul li {
    float: left;
}
.sk_content {
    float: left;
}
.sk_list ul li a {
    display: block;
    line-height: 47px;
    padding: 0 30px;
    font-size: 16px;
    font-weight: 700;
    color: #000;
}
.sk_content ul li {
    float: left;
}
.sk_content ul li a {
    display: block;
    line-height: 49px;
    padding: 0 20px;
    font-size: 14px;
}
.sk_content ul li:last-child a::after {
    content: '\e908';
    font-family: icomoon;
}
.sk_bd {
    margin-bottom: 283px;
}
.sk_bd ul li {
    float: left;
    width: 290px;
    height: 460px;
    margin-right: 13px;
    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: inline-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: inline-block;
    height: 10px;
    width: 16px;
    border-radius: 0 6px 6px 0;
    border: 1px solid #ed282e;
    background-color: #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 .qianggou a {
    display: block;
    height: 50px;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    color: #fff;
    background-color: #ed282e;
    margin-top: 25px;
}


注册页

对应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>
    
    <link rel="shortcut icon" href="favicon.ico" />
    
    <link rel="stylesheet" href="css/base.css">
    
    <link rel="stylesheet" href="css/register.css">
head>

<body>
    <div class="w">
        <header>
            <div class="logo">
                <a href="index.html"><img src="images/logo.png" alt="">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" class="inp"> <span class="error"><i
                                    class="error_icon">i>
                                手机号码格式不正确,请重新输入span>li>
                        <li><label for="">短信验证码:label><input type="text" class="inp"> <span class="success"><i
                                    class="success_icon">i>
                                短信验证码输入正确span>li>
                        <li><label for="">登陆密码:label><input type="password" class="inp"> <span class="error"><i
                                    class="error_icon">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" class="inp"> <span class="error"><i
                                    class="error_icon">i>
                                两次密码输入不一致,请重新输入span>li>
                        <li class="agree"><input type="checkbox" name="" id=""> 同意协议并注册 <a href="#"> 《知晓用户协议》 a>li>
                        <input type="submit" value="完成注册" class="btn">
                    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 Sitea>|<a href="#">Contact
                            Ua>
                    ul>
                div>
                <div class="copyright">
                    地址:北京市昌平区建材城西路金燕龙办公楼一层 邮编:100096 电话:400-618-4000 传真:010-82935100 邮箱: zhanghj+itcast.cn<br>
                    京ICP备08001421号京公网安备110108007702
                div>
            div>
        footer>
    div>
body>

html>

对应的css内容:

/* 注册页面css样式 */
.w {
    width: 1200px;
    margin: 0 auto;
}
header {
    height: 84px;
    border-bottom: 1px solid #c81523;
}
.logo {
    padding-top: 18px;
}
.registerarea {
    height: 522px;
    border: 1px solid #ccc;
    margin-top: 20px;
}
.registerarea h3 {
    height: 42px;
    line-height: 42px;
    border-bottom: 1px solid #ccc;
    background-color: #ececec;
    padding: 0 10px;
    font-weight: 400;
    font-size: 18px;
}
.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 {
    color: #c81523;
}
.error_icon,
.success_icon {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    background: url(../images/error.jpg) no-repeat;
    margin-top: -2px;
}
.success {
    color: green;
}
.success_icon {
    background: url(../images/success.png) no-repeat;
}
.safe {
    padding-left: 150px;
}
.safe em {
    padding: 0 12px;
    color: #fff;
}
.ruo {
    background-color: #de1111;
}
.zhong {
    background-color: #40b83f;
}
.qiang {
    background-color: #f79100;
}
.agree {
    padding-left: 90px;
}
.agree input {
    vertical-align: middle;
}
.agree a {
    color: #1ba1e6;
}
.btn {
    width: 200px;
    height: 34px;
    margin: 30px 0 0 70px;
    background-color: #c81523;
}
.mod_copyright {
    text-align: center;
    padding-top: 20px;
}
.mod_copyright .links {
    margin-bottom: 15px;
}
.mod_copyright .copyright {
    line-height: 20px;
}
.links a {
    margin: 0 16px;
}

后话

其实关于品优购的练习当然还不止这些,不过目前就做了这么多。这些已经可以练习到html和css几乎所有内容。需要的品优购网页练习资源的关注下博主,私信发。

你可能感兴趣的:(前端,css,html,前端)