CSS3-box-shadow练习

208 阅读1分钟

2021-07-19_170311.png

<!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>
        body {
            background-color: black;
        }

        div {
            width: 300px;
            height: 300px;
            border-radius: 50%;
            /* border: 1px solid white; */
            position: absolute;
            top: calc(50% - 150px) ;
            left: calc(50% - 150px);
        }
        .style1{
            box-shadow: inset 0 0 20px white,
            inset 10px 0 50px #f0f,
            inset -10px 0 50px #0ff,
            inset 10px 0 100px #f0f,
            inset -10px 0 100px #0ff,
            0 0 20px white,
            10px 0 70px #f0f,
            -10px 0 70px #0ff;
        }
    </style>
</head>

<body>
    <div class="style1"></div>
</body>

</html>