-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcardboard-box.html
127 lines (111 loc) · 2.43 KB
/
cardboard-box.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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="main.css">
<title>CSS Art | Cardboard Box</title>
</head>
<body>
<style>
html, body {
margin: 0;
padding: 0;
}
.wrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.content {
display: inline-block;
}
.top {
position: relative;
width: 101px;
height: 36px;
margin-bottom: -19px;
background-color: #3a271d;
transform: skew(70deg, -20deg) translateX(49px);
}
.top::after {
position: absolute;
background-color: #be8565;
top: 0;
left: 0;
width: 101%;
height: 50%;
content: '';
transform: skewX(28deg) translateX(5px);
}
.top::before {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 50%;
background: linear-gradient(#80533b, #aa765a);
content: '';
}
.sides {
display: flex;
}
.side {
position: relative;
width: 100px;
height: 120px;
background: linear-gradient(#aa765a, #80533b);
transform: skewY(20deg);
}
.side+.side {
background: linear-gradient(to bottom, #634433, #4e3629);
transform: skewY(-20deg);
}
.side:first-of-type::before {
position: absolute;
top: 10px;
right: 10px;
width: 30px;
height: 30px;
background-color: #fff;
content: ''
}
.side:first-of-type::after {
position: absolute;
top: 13px;
right: 13px;
width: 24px;
height: 24px;
background-color: rgb(180, 16, 16);
content: ''
}
.side+.side::after {
position: absolute;
content: '';
bottom: 0;
right: 0;
width: 100%;
height: 60%;
background-color: #000;
opacity: 0.2;
transform: translate(51%, 100%) skewX(55deg);
}
</style>
<header class="art-page-header">
<a href="index.html" class="app-text-link">
<span>index.html</span>
</a>
</header>
<div class="wrapper">
<div class="content">
<div class="top"></div>
<div class="sides">
<div class="side"></div>
<div class="side"></div>
</div>
</div>
</div>
</body>
</html>