-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay10(Image Reflection).html
48 lines (48 loc) · 1.51 KB
/
Day10(Image Reflection).html
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
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Reflection</title>
<style>
.bg {
background: url('https://images.unsplash.com/photo-1481016863889-534cbad65379?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80');
background-repeat: no-repeat;
background-size: cover;
background-position: center right;
margin: 50px auto;
height: 60vh;
width: 80vw;
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
position: relative;
/* we can also use this property for reflection */
/* -webkit-box-reflect: below 6px; */
/* end */
}
.bg::after{
content: '';
background: inherit;
background-repeat: no-repeat;
background-size: cover;
background-position: center right;
position: absolute;
bottom: -101%;
height: inherit;
width: inherit;
transform: rotateX(180deg);
}
.bg::before {
background-image: linear-gradient(to bottom, rgba(255,255,255,0.2), #fff 60%, #fff);
content: '';
position: absolute;
bottom: -101%;
height: inherit;
width: inherit;
z-index: 100;
}
</style>
</head>
<body>
<div class="bg"></div>
</body>
</html>