-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmultilayer-card.html
127 lines (113 loc) · 3.09 KB
/
multilayer-card.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Multilayer card</title>
</head>
<body>
<style>
.levels {
position: absolute;
top: 50%;
left: 50%;
margin-left: -140px;
margin-top: -180px;
transform-style: preserve-3d;
user-select: none;
}
.levels .level {
position: relative;
width: 280px;
height: 140px;
border-radius: 12px;
color: #ffc0cb;
cursor: pointer;
transition: all 0.4s ease;
transform: rotateX(45deg) rotateY(-15deg) rotate(45deg);
}
.levels .level.one {
margin-top: -70;
background-color: #8063e1;
background-image: linear-gradient(135deg, #bd7be8, #8063e1);
box-shadow: 20px 20px 60px rgba(34, 50, 84, 0.5), 1px 1px 0px 1px #8063e1;
z-index: 4;
opacity: 0.9;
}
.levels .level.two {
margin-top: -70;
background-color: #3f58e3;
background-image: linear-gradient(135deg, #7f94fc, #3f58e3);
box-shadow: 20px 20px 60px rgba(34, 50, 84, 0.5), 1px 1px 0px 1px #3f58e3;
z-index: 3;
opacity: 0.9;
}
.levels .level.three {
margin-top: -70;
background-color: #2c6fd1;
background-image: linear-gradient(135deg, #21bbfe, #2c6fd1);
box-shadow: 20px 20px 60px rgba(34, 50, 84, 0.5), 1px 1px 0px 1px #2c6fd1;
z-index: 2;
opacity: 0.9;
}
.levels .level.four {
margin-top: -70;
background-color: #352f64;
background-image: linear-gradient(135deg, #415197, #352f64);
box-shadow: 20px 20px 60px rgba(34, 50, 84, 0.5), 1px 1px 0px 1px #352f64;
z-index: 1;
opacity: 0.9;
}
.levels .level .title {
position: absolute;
top: 28px;
left: 15px;
font-size: 26px;
font-weight: bold;
}
.levels .level .content {
position: absolute;
font-weight: 700;
bottom: 15px;
left: 15px;
font-size: 16px;
}
.levels .level:hover {
transform: rotateX(30deg) rotateY(-15deg) rotate(30deg) translate(-25px, 50px);
opacity: 0.6;
}
.levels .level:hover:after {
transform: translateX(100%);
transition: all 1.2s ease-in-out;
}
.levels .level::after {
content: '';
position: absolute;
top: 0px;
left: 0;
width: 100%;
height: 100%;
transform: translateX(-100%);
background-image: linear-gradient(60deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 80%);
}
</style>
<div class="levels">
<div class="level one">
<div class="title">One</div>
<div class="content">One Content</div>
</div>
<div class="level two">
<div class="title">Two</div>
<div class="content">Two Content</div>
</div>
<div class="level three">
<div class="title">Three</div>
<div class="content">Three Content</div>
</div>
<div class="level four">
<div class="title">Four</div>
<div class="content">Four Content</div>
</div>
</div>
</body>
</html>