前端学习-CSS轮廓阴影圆角

<!DOCTYPE html>

<html lang="zh">

<head>

    <meta charset="UTF-8">

    <title>Document</title>

    <style>

        .box{

            width: 200px;

            height: 200px;

            background-color: blue;

            border: brown solid 20px;

            /* 盒子的阴影 shadow 在元素下层 不会影响盒子大小

                1 水平偏移

                2 垂直偏移

                3 阴影范围

                4 颜色          

            */

            box-shadow: 20px 20px 20px greenyellow  ;

         

        }

        .box:hover{

              /*轮廓 outline不会影响盒子大小 直接覆盖下方 */

              outline: springgreen solid 10px;

        }

        .box2{

            width: 200px;

            height: 200px;

            background-color: hotpink;

            /* 倒角  radius*/

            /* border-radius  */

            border-top-left-radius: 20px;

            border-top-right-radius: 20px;

            border-bottom-left-radius: 20px;

            border-bottom-right-radius:20px;

            /* 50%以上都为圆形 */

            border-radius: 50%;

        }

    </style>

</head>

<body>

    <div class="box"></div>

    123

    <div class="box2"></div>

</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值