-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSkewed_Border_Card.html
170 lines (166 loc) · 5.24 KB
/
Skewed_Border_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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Skewed Border</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
user-select: none;
}
body{
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: #060c21;
flex-wrap: wrap;
}
.container{
position: relative;
width: 90%;
display: grid;
grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
grid-gap: 0 40px;
grid-row: auto;
}
.container .box{
position: relative;
height: 400px;
background: #060c21;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #000;
}
.container .box::before{
content: "";
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
background: #fff;
z-index: -1;
transform: skew(2deg,2deg);
}
.container .box:nth-child(1):before{
background: linear-gradient(315deg,#ff0057,#e64a19);
}
.container .box:nth-child(2):before{
background: linear-gradient(315deg,#89ff00,#00bcd4);
}
.container .box:nth-child(3):before{
background: linear-gradient(315deg,#e91e63,#5d02ff);
}
.container .box:nth-child(4):before{
background: linear-gradient(315deg,#ff0000,#ffc107);
}
.container .box::after{
content: "";
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 100%;
background: rgba(255,255,255, 0.05);
pointer-events: none;
}
.container .content{
position: relative;
padding: 20px;
}
.content h2{
position: absolute;
z-index: 1000;
top: -60px;
right: 20px;
margin: 0;
padding: 0;
font-size: 10em;
color: rgba(255, 255, 255, 0.05);
transition: 0.5s;
}
.box:hover .content h2{
top: -140px;
transition: 0.5s;
}
.box .content h3{
margin: 0 0 10px;
padding: 0;
font-size: 24px;
font-weight: 500;
color: #fff;
}
.box .content p{
margin: 0;
padding: 0;
color: #fff;
font-size: 16px;
}
.box .content a{
position: relative;
margin: 20px 0 0;
padding: 10px 20px;
text-decoration: none;
border: 1px solid #fff;
display: inline-block;
color: #fff;
transition: 0.5s;
transform: translateY(-40px);
opacity: 0;
visibility: hidden;
}
.box:hover .content a{
transform: translateY(0);
opacity: 1;
visibility: visible;
}
.content a:hover{
color: #000;
background: #fff;
transition: 0.5s;
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<div class="content">
<h2>01</h2>
<h3>Service One</h3>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Totam necessitatibus iusto consectetur ea temporibus consequuntur, inventore aliquid explicabo sequi</p>
<a href="#">Read More</a>
</div>
</div>
<div class="box">
<div class="content">
<h2>02</h2>
<h3>Service Two</h3>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Totam necessitatibus iusto consectetur ea temporibus consequuntur, inventore aliquid explicabo sequi</p>
<a href="#">Read More</a>
</div>
</div>
<div class="box">
<div class="content">
<h2>03</h2>
<h3>Service Three</h3>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Totam necessitatibus iusto consectetur ea temporibus consequuntur, inventore aliquid explicabo sequi</p>
<a href="#">Read More</a>
</div>
</div>
<div class="box">
<div class="content">
<h2>04</h2>
<h3>Service Four</h3>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Totam necessitatibus iusto consectetur ea temporibus consequuntur, inventore aliquid explicabo sequi</p>
<a href="#">Read More</a>
</div>
</div>
</div>
</body>
</html>