Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
260 views
in Technique[技术] by (71.8m points)

html - Css Advanced Box Shadow

Is it possible to make bellow by css?. I'm trying to use box shadow but 2 days with no result , please help me

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yes it's possible, I recommend that you learn box-shadow property first, and play with the div tag. the syntax for that is:

box-shadow: x-direction y-direction blur color;

here's my attempt

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .top-shadow {
            margin-top: 100px;
            background-color: white;
            height: 100px;
            box-shadow: 0 10px 10px #C0B6B6;
        }

        .right-shadow {
            box-shadow: 3px 1px 1px #C0B6B699;
            height: 1000px;
            margin: -100px;
            width: 80%;

        }
    </style>
    <title>Document</title>
</head>
<body>
    <div class="top-shadow"></div>
    <div class="right-shadow"></div>
</body>
</html>

result

enter image description here

hope that it's help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...