HTML的

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            .box{
                width: 400px;
                height: 400px;
                border: 1px solid #000;
                margin: 50px auto 0;
                position: relative;
            }
            .box div{
                width: 200px;
                height: 200px;
                position: absolute;
            }
            .box1{
                background-color: #000;
                left: 20px;
                top: 20px;
                z-index: 10;
            }
            .box2{
                background-color:antiquewhite;
                left: 40px;
                top: 40px;
                z-index: 11;
            }
            .box3{
                background-color: aqua;
                left: 60px;
                top: 60px;
            }
            .box4{
                background-color:cadetblue;
                left: 80px;
                top: 80px;
            }
            .con{
                width: 100px;
                height: 100px;
                background-color: gold;
                margin: 50px auto 0;
                position: relative;
                border-radius: 14px;
            }
            .a{
                width:28px;
                height: 28px;
                background-color: red;
                color: #fff;
                line-height: 28px;
                text-align: center;
                position: absolute;
                left: 86px;
                top: -14px;
                border-radius: 14px;/* 这是设置圆角,值一般是盒子大小的半径 */
            }
        </style>
    </head>
    <body>
        <div class="box">
            <div class="box1"></div>
            <div class="box2"></div>
            <div class="box3"></div>
            <div class="box4"></div>
        </div>
        <div class="con">
            <div class="a">5</div>
        </div>
    </body>
</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值