使用CSS3实现简单画图、三角形、梯形和月亮

 代码如下:

<!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>Document</title>

    <style>

          *{

            margin: 0;

            padding: 0;

        }

    html,body{

            width: 100%;

            height: 100%;

        }

    .maxbox{

            width: 1438px;

            height: 780px;

            background-color:black;

            border: 1px solid transparent;

        }

    .moon{

        width: 80px;

        height: 80px;

        background-color: black;

        border-radius: 50%;

        margin-top: 5px;

        margin-left: 1350px;

        box-shadow: -10px 10px 0px 8px white;

    }

    .wd{

        width: 0px;

        height: 0px;

        border-left: 220px solid transparent;

        border-right: 220px solid transparent;

        border-bottom: 220px solid blue;

        margin-top: 63px;

        margin-left: 380px;

    }

    .yc{

        width: 40px;

        height: 150px;

        background-color:transparent;

        border-right: 60px solid blue;

        margin-top: -200px;

        margin-left: 630px;

    }

    .romm{

        width: 420px;

        height: 350px;

        background-color: rgb(255,126,34);

        margin-top: 50px;

        margin-left: 390px;

    }

    .glass{

        width: 1438px;

        height: 70px;

        margin-bottom: 0px;

        background-color: green;

    }

    .tree_1{

        width: 0px;

        height: 0px;

        border-left: 60px solid transparent;

        border-right: 60px solid transparent;

        border-bottom: 40px solid green;

        margin-top: -500px;

        margin-left: 980px;

    }

    .tree_2{

        width: 0px;

        height: 0px;

        border-left: 90px solid transparent;

        border-right: 90px solid transparent;

        border-bottom: 90px solid green;

        margin-top: 0px;

        margin-left: 950px;

    }

    .tree_3{

        width: 0px;

        height: 0px;

        border-left: 120px solid transparent;

        border-right: 120px solid transparent;

        border-bottom: 120px solid green;

        margin-top: 0px;

        margin-left: 920px;

    }

    .tree_4{

        width: 45px;

        height: 240px;

        background-color: green;

        margin-top: 0px;

        margin-left: 1018px;

    }

    </style>

</head>

<body>

    <div class="maxbox">

        <div>

            <div class="moon"></div>

            <div class="wd"></div>

            <div class="yc"></div>

            <div class="romm"></div>

    </div>

        <div class="glass"></div>

        <div>

           <div class="tree_1"></div>

           <div class="tree_2"></div>

           <div class="tree_3"></div>

        <div class="tree_4"></div>

    </div>

    </div>

</body>

</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值