"Box shadow hacks"
Bootstrap 4.1.1 Snippet by chouaib45

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<!-- box shadow style -01 -->
<div class="col-4 mt-4">
<div class="jumbotron style-01">
<span class="display-5">
Box Shadow 01
</span>
</div>
</div>
<!-- box shadow style -02 -->
<div class="col-4 mt-4">
<div class="jumbotron style-02">
<span class="display-5">
Box Shadow 02
</span>
</div>
</div>
<!-- box shadow style -03 -->
<div class="col-4 mt-4 ">
<div class="jumbotron style-03">
<span class="display-5">
Box Shadow 03
</span>
</div>
</div>
<div class="w-100"></div>
<!-- box shadow style -04 -->
<div class="col-4 mt-4">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
* {
margin: 0;
padding: 0;
}
.style-01 {
position: relative;
}
.style-01::before, .style-01::after {
content: '';
position: absolute;
top: 80%;
bottom: 13px;
display: block;
width: 50%;
-webkit-box-shadow: 0 15px 10px #777;
box-shadow: 0 15px 10px #777;
z-index: -1;
left: 10px;
}
.style-01::before {
background: transparent;
right: 10px;
left: auto;
-webkit-transform: rotate(4deg);
transform: rotate(4deg);
}
.style-01::after {
background: transparent;
-webkit-transform: rotate(-4deg);
transform: rotate(-4deg);
}
.style-02 {
position: relative;
}
.style-02::before {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: