box-shadow的强大,用box-shadow画一个机器猫

box-shadow相信每个人都用过,可能你不知道box-shadow可以做出很多效果,下面我用box-shadow画一个机器猫,展示box-shadow的强大

代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .container{
            position: relative;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin: 300px auto;
            background-color: #C63D01;
            box-shadow: 0px 0px 0 1px #000,
                -20px -26px 0 -10px #333333,
                -34px -40px 0 15px #fff,
                -34px -40px 0 16px,
                20px -26px 0 -10px #333333,
                34px -40px 0 15px #fff,
                34px -40px 0 16px,
                0px 55px 0 75px #fff,
                0px 55px 0 76px #000,
                0 22px 0 120px #08BDEB,
                0 22px 0 121px #000;
        }
        /*叮当猫的鼻子*/
        .container::before{
            content: '';
            position: absolute;
            bottom: -81px;
            left: 17px;
            height: 80px;
            width: 2px;
            background-color: #000;
        }
        /*叮当猫的嘴巴*/
        .container::after{
            content: '';
            position: absolute;
            bottom: -83px;
            left: -44px;
            width: 125px;
            height: 70px;
            border-bottom-right-radius: 28px;
            border-bottom: solid 2px black;
            border-bottom-left-radius: 28px;
        }
    </style>
</head>
<body>
    <div class="container">
    </div>
</body>
</html>

效果图:


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值