利用css3绘制哆啦A梦

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            *{
                margin: 0;
                padding: 0;
            }
            .box{
                width: 800px;
                height: 800px;
                background-color: transparent;
                margin: 0 auto;
            }
            .box .head{
                width: 400px;
                height: 400px;
                border: 2px solid #0f90e3;
                border-radius: 50% ;
                background-color: #0f90e3;
                position: relative;
            }
            .face{
                width: 340px;
                height: 340px;
                border: 2px solid white;
                border-radius: 50%;
                background-color: white;
                position: absolute;
                top: 70px;
                left: 28px;
                position: relative;
            }
            .eye{
                border: 2px solid black;
                background-color: white;
                border-radius: 55%;
                width: 70px;
                height: 75px;
            }
            .eye-l{
                position: absolute;
                top: -31px;
                left: 95px;
                position: relative;
            }
            .eye-r{
                position: absolute;
                top: -31px;
                left: 168px;
            }
            .left-o{
                border: 2px solid gray;
                border-radius: 50%;
                width: 35px;
                height:120px;
                position: absolute;
                top: 20px;
                left: 30px;
                border-color:gray  transparent transparent transparent;
            }
            .right-o{
                width: 20px;
                height: 37px;
                border-radius: 50%;
                background-color: black;
                border: 1px solid black;
                position: absolute;
                top: 12px;
                left: 14px;
            }
            .white-1{
                width: 10px;
                height: 17px;
                border: 1px solid black;
                border-radius: 50%;
                background-color: white;
                position: absolute;
                top: 6px;
                left: 1px;
            }
            .nose{
                width: 50px;
                height: 50px;
                background-color: red;
                border: 2px solid black;
                border-radius: 50%;
                position: absolute;
                top: 15px;
                left: 140px;
            }
            .white-2{
                width: 15px;
                height: 15px;
                background-color: white;
                border: 1px solid white;
                border-radius: 50%;
                position: absolute;
                top: 10px;
                left: 10px;
            }
            .black{
                width: 117px;
                border: 1px solid black;
                background-color: black;
            }
            .black-1{
                transform: rotate(12deg);
            }
            .black-2{
                transform: rotate(0deg);
                position: absolute;
                top: 130px;
                left:-2px;
            }
            .black-3{
                transform: rotate(-11deg);
                position: absolute;
                top: 175px;
                left: -2px;
            }
            .black-4{
                transform: rotate(168deg);
                position: absolute;
                right: 2px;
                top: 79px;
            }
            .black-5{
                transform: rotate(0deg);
                position: absolute;
                right: -2px;
                top: 130px;
            }
            .black-6{
                transform: rotate(11deg);
                position: absolute;
                right: -2px;
                top: 175px;
            }
            .center{
                width: 1px;
                height: 172px;
                border: 1px solid black;
                background-color: black;
                position: absolute;
                top: 67px;
                left: 165px;
            }
            .mouth{
                position: absolute;
                top: -112px;
                left: -7px;
                width: 350px;
                height: 350px;
                border: 3px solid black;
                border-radius: 50%;
                border-color: transparent transparent black transparent; 
            }
            .red{
                width: 317px;
                height: 25px;
                border: 1px solid black;
                background-color: red;
                border-radius: 20px 20px;
                position: absolute;
                top: 340px;
                left: 41px;
            }
            .leg{
                width: 303px;
                height: 160px;
                border: 1px solid black;
                background-color: #0f90e3;
                position: absolute;
                top: 367px;
                left: 44px;
                border-color: black black white black;
            }
            .arm{
                width: 112px;
                height: 38px;
                border: 1px solid black;
                background-color: #0f90e3;
                border-color:black transparent transparent transparent;
            }
            .arm-l{
                transform: rotate(-47deg);
                position: absolute;
                bottom: -42px;
                left: -35px;
                z-index: 1;
            }
            .arm-r{
                transform: rotate(55deg);
                position: absolute;
                bottom: -42px;
                right: -30px;
                z-index: 1;
            }
            .hand{
                width: 60px;
                height: 60px;
                border-radius: 50%;
                border: 1px solid black;
                background-color: white;
                z-index: 2;
            }
            .hand-l{
                position: absolute;
                left: -48px;
                bottom: -94px;
            }
            .hand-r{
                position: absolute;
                bottom: -94px;
                right: -31px;
            }
            .big{
                width: 240px;
                height: 120px;
                border: 1px solid black;
                background-color: white;
                border-radius: 0 0 120px 120px;
                position: absolute;
                top: 0;
                left: 34px;
            }
            .small{
                width: 150px;
                height: 75px;
                border: 1px solid black;
                border-radius: 0 0 75px 75px;
                position: absolute;
                left: 44px;
                bottom: 8px;
            }
            .yellow{
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background-color: yellow;
                border: 1px solid black;
                position: absolute;
                top: -29px;
                left: 88px;
            }
            .xxx{
                width: 44px;
                height: 5px;
                border: 1px solid black;
                border-radius: 10px 10px;
                position: absolute;
                top: 10px;
                left: 1px;
            }
            .ccc{
                width: 15px;
                height: 15px;
                border-radius: 50%;
                background-color: black;
                position: absolute;
                top: 20px;
                left: 18px;
            }
            .yyy{
                height: 20px;
                width: 1px;
                border: 1px solid black;
                background-color: black;
                position: absolute;
                top: 28px;
                left:24px;
            }
            .under{
                width: 40px;
                height: 20px;
                border-radius: 20px 20px 0 0 ;
                background-color: white;
                position: absolute;
                bottom: 0;
                left: 130px;
                border: 1px solid black;
                border-color: black black transparent black;
            }
            .foot{
                width: 158px;
                height: 20px;
                border: 1px solid black;
                border-radius: 15px 15px;
                background-color: white;
            }
            .foot-l{
                position: absolute;
                bottom: -150px;
                left: 30px;
            }
            .foot-r{
                position: absolute;
                bottom: -150px;
                right: 30px;
            }
        </style>
    </head>
    <body>
        <div class="box">
            <div class="head">
                <div class="face">
                    <div class=" eye eye-l">
                        <div class="left-o"></div>
                    </div>
                    <div class="eye eye-r">
                        <div class="right-o">
                            <div class="white-1"></div>
                        </div>
                    </div>
                    <div class="nose">
                        <div class="white-2"></div>
                    </div>
                    <div class="black black-1"></div>
                    <div class="black black-2"></div>
                    <div class="black black-3"></div>
                    <div class="black black-4"></div>
                    <div class="black black-5"></div>
                    <div class="black black-6"></div>
                    <div class="center"></div>
                    <div class="mouth"></div>
                </div>
                <div class="red"></div>
                <div class="leg">
                    <div class="big">
                        <div class="small"></div>
                        <div class="yellow">
                            <div class="xxx"></div>
                            <div class="ccc"></div>
                            <div class="yyy"></div>
                        </div>
                    </div>
                    <div class="under"></div>
                </div>
                <div class=" arm arm-l"></div>
                <div class="arm arm-r"></div>
                <div class="hand hand-l"></div>
                <div class="hand hand-r"></div>
                <div class="foot foot-l"></div>
                <div class="foot foot-r"></div>
            </div>
        </div>
    </body>
</html>

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值