利用border-radius绘制安卓机器人

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        .all
        {
            margin: 30px auto;
        }
        .head
        {
            width: 200px;
            height: 100px;
            background-color: green;
            border-radius: 100px 100px 0px 0px;
            margin: 10px auto;
            position: relative;

        }
        .head:after
        {
            content: "";
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color:white;
            position: absolute;
            left: 40px;
            top: 40px;
        }

        .head:before
        {
            content: "";
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: white;
            position: absolute;
            top: 40px;
            left: 140px;
        }

        .body
        {
            width: 200px;
            height: 200px;
            background-color: green;
            margin: 0px auto;
            border-radius: 0px 0px 30px 30px;
            position: relative;
        }
        .body:after
        {
            content: "";
            width: 30px;
            height: 120px;
            background-color: green;
            border-radius: 10px;
            position: absolute;
            top: 20px;
            left: -40px;
        }

        .body:before
        {
            content: "";
            width: 30px;
            height: 120px;
            background-color: green;
            border-radius: 10px;
            position: absolute;
            top: 20px;
            left: 210px;
        }

        .foot
        {
            position: relative;
            width: 100px;
            height: 100px;
            margin: 0px auto;
        }

        .foot:before
        {
           width: 30px;
            height: 90px;
            background-color: green;
            content: "";
            left: -20px;
            position: absolute;
            border-radius: 0px 0px 10px 10px;
        }
        .foot:after
        {
            width: 30px;
            height: 90px;
            background-color: green;
            content: "";
            position: absolute;
            border-radius: 0px 0px 10px 10px;
            left: 90px;
        }

    </style>
</head>
<body>
<div class="all">
  <div class="head"></div>
  <div class="body"></div>
  <div class="foot"></div>
</div>

<script>

</script>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值