EN
CSS - multiple div shadows
3 points
In this article, we would like to show you how to create multiple shadows for div element using CSS.
Quick solution:
xxxxxxxxxx
1
div {
2
box-shadow:
3
-30px -30px 5px #6ef5da, /* shadow 1 */
4
30px -30px 5px #6ef57e, /* shadow 2 */
5
-30px 30px 5px #796ef5, /* shadow 3 */
6
30px 30px 5px #b93af8; /* shadow 4 */
7
}
Where: number of box shadows can be different.
Screenshot:

box-shadow
arguments are organized in the following way:
In this example, we add four shadows to the square div
element.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
.shadow {
7
border: 2px solid black;
8
width: 50px;
9
height: 50px;
10
margin: 50px;
11
12
/* multiple shadows - 4 shadows */
13
box-shadow:
14
-30px -30px 5px #6ef5da, /* shadow 1 */
15
30px -30px 5px #6ef57e, /* shadow 2 */
16
-30px 30px 5px #796ef5, /* shadow 3 */
17
30px 30px 5px #b93af8; /* shadow 4 */
18
}
19
20
</style>
21
</head>
22
<body style="min-height: 150px">
23
<div class="shadow"></div>
24
</body>
25
</html>