布局:盒子模型综合练习

盒子模型综合练习

这边可以下源码和素材
样张
在这里插入图片描述

  1. 先打开ps(或者其他带标尺的看图软件)测量各个部分的大小
    测量整体框架大小
    测量各个框架
    细节测量与计算
    大概就这样那样搞一搞
  2. 核验测量数据(很重要,要不然错了代码打一半又要改一大堆数据)
  3. 开打
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style type="text/css">
            *{
                margin: 0;
                padding: 0;
            }
            .box{
                width: 298px;
                height: 226px;
                border: #cccccc 1px solid;
                background: url("img/背景1.jpg");
                padding: 0 15px;
                margin: 100px auto;
            }
            .new{
                width:298px ;
                height: 26px;
                border-bottom: #cccccc 1px solid;
                font-size: 18px;
                padding-top: 17px;
                line-height: 26px;
                font-weight: bolder;
            }
            .d1{
                padding-top: 13px;
                background: url("img/图标.jpg") 5px 21px no-repeat;
            }
            .d2{
                padding-top: 3px;
                background: url("img/图标.jpg") 5px 12px no-repeat;
            }
            .d{
                width: 278px;
                height: 27px;
                border-bottom: #cccccc 1px dashed;
                font-size: 10px;
                line-height: 27px;
                padding-left: 20px;
            }
            a{
                text-decoration: none;
                color: black;
            }
        </style>
    </head>
    <body>
    <div class="box">
        <div class="new">最新文章/New Articles</div>
        <div class="d d1"><a href="">北京招聘网页设计,平面设计,php</a></div>
        <div class="d d2"><a href="">体验javascript的魅力</a></div>
        <div class="d d2"><a href="">jquery世界来临</a></div>
        <div class="d d2"><a href="">网页设计师的梦想</a></div>
        <div class="d d2"><a href="">jquery中的链式编程是什么</a></div>
    </div>
    </body>
    </html>
    

这边可以下源码和素材

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值